I have been trying all day to get this to work. Right now I am able to save the document as .docx file but I wanted to be able to save the document as PDF I have tried with
When I print the error to log, I realize it is trying to load the dompdf_config.inc.php from an invalid location. See below.
C:\wamp\www\cccake\app\Vendor\dompdf\dompdf.php/dompdf_config.inc.php\n
Rather than altering the class files of PHPExcel/ PHPWord, it's wise to change the configuration in your view. Ignoring the $rendererLibrary completely in the $rendererLibraryPath fixed my issue. I think the PHPExcel/PHPExcel know how to pick dompdf.php file (tcpdf.php) in your case. Try below code let us know if it doesn't work.
$rendererLibrary = 'tcpdf.php'; $rendererLibraryPath = dirname(FILE) .'/plugins/tcpdf';
Make sure to send DOMPDF Path in:
$domPdfPath = "..vendor/dompdf/dompdf/";
Settings::setPdfRendererName(Settings::PDF_RENDERER_DOMPDF);
Settings::setPdfRendererPath($domPdfPath); //<---
Then in AbstractRerender construct if you echo $this->Include file you should see 'dompdf_config.inc.php'
If you don't have dompdf_config.inc.php file, try to use dompdf 0.6.2
Knowing al that, I'm guessing the answer is changing:
$includeFile = Settings::getPdfRendererPath() . '/' . $this->includeFile;
to
$includeFile = Settings::getPdfRendererPath();