Validate existence of PDF Renderer library before instantiating renderer class
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@91572 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
3783c7e099
commit
1b642d4e7d
|
@ -27,7 +27,12 @@
|
||||||
|
|
||||||
|
|
||||||
/** Require DomPDF library */
|
/** Require DomPDF library */
|
||||||
require_once PHPExcel_Settings::getPdfRendererPath() . '/dompdf_config.inc.php';
|
$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/dompdf_config.inc.php';
|
||||||
|
if (file_exists($pdfRendererClassFile)) {
|
||||||
|
require_once $pdfRendererClassFile;
|
||||||
|
} else {
|
||||||
|
throw new Exception('Unable to load PDF Rendering library');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Writer_PDF_DomPDF
|
* PHPExcel_Writer_PDF_DomPDF
|
||||||
|
|
|
@ -27,7 +27,12 @@
|
||||||
|
|
||||||
|
|
||||||
/** Require mPDF library */
|
/** Require mPDF library */
|
||||||
require_once PHPExcel_Settings::getPdfRendererPath() . '/mpdf.php';
|
$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/mpdf.php';
|
||||||
|
if (file_exists($pdfRendererClassFile)) {
|
||||||
|
require_once $pdfRendererClassFile;
|
||||||
|
} else {
|
||||||
|
throw new Exception('Unable to load PDF Rendering library');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Writer_PDF_mPDF
|
* PHPExcel_Writer_PDF_mPDF
|
||||||
|
|
|
@ -27,8 +27,13 @@
|
||||||
|
|
||||||
|
|
||||||
/** Require tcPDF library */
|
/** Require tcPDF library */
|
||||||
$k_path_url = PHPExcel_Settings::getPdfRendererPath();
|
$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/tcpdf.php';
|
||||||
require_once PHPExcel_Settings::getPdfRendererPath() . '/tcpdf.php';
|
if (file_exists($pdfRendererClassFile)) {
|
||||||
|
$k_path_url = PHPExcel_Settings::getPdfRendererPath();
|
||||||
|
require_once $pdfRendererClassFile;
|
||||||
|
} else {
|
||||||
|
throw new Exception('Unable to load PDF Rendering library');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHPExcel_Writer_PDF_tcPDF
|
* PHPExcel_Writer_PDF_tcPDF
|
||||||
|
|
Loading…
Reference in New Issue