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';