diff --git a/Classes/PHPExcel/Writer/PDF/DomPDF.php b/Classes/PHPExcel/Writer/PDF/DomPDF.php index 2784e149..82bfaeac 100644 --- a/Classes/PHPExcel/Writer/PDF/DomPDF.php +++ b/Classes/PHPExcel/Writer/PDF/DomPDF.php @@ -27,7 +27,12 @@ /** 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 diff --git a/Classes/PHPExcel/Writer/PDF/mPDF.php b/Classes/PHPExcel/Writer/PDF/mPDF.php index e8ff3201..ccd17a22 100644 --- a/Classes/PHPExcel/Writer/PDF/mPDF.php +++ b/Classes/PHPExcel/Writer/PDF/mPDF.php @@ -27,7 +27,12 @@ /** 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 diff --git a/Classes/PHPExcel/Writer/PDF/tcPDF.php b/Classes/PHPExcel/Writer/PDF/tcPDF.php index f342a654..08e7ca78 100644 --- a/Classes/PHPExcel/Writer/PDF/tcPDF.php +++ b/Classes/PHPExcel/Writer/PDF/tcPDF.php @@ -27,8 +27,13 @@ /** Require tcPDF library */ -$k_path_url = PHPExcel_Settings::getPdfRendererPath(); -require_once PHPExcel_Settings::getPdfRendererPath() . '/tcpdf.php'; +$pdfRendererClassFile = 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