I am trying to get dompdf running on an in-house server. With the default config.inc.php settings, I get the following when running the equivalent of the demo 'Hello Wolrd' script:
Warning: require_once(/var/www/dompdf-master/lib/php-font-lib/classes/font.cls.php): failed to open stream: No such file or directory in /var/www/dompdf-master/dompdf_config.inc.php on line 335 Fatal error: require_once(): Failed opening required '/var/www/dompdf-master/lib/php-font-lib/classes/font.cls.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/dompdf-master/dompdf_config.inc.php on line 335
When I turn off DOMPDF_ENABLE_AUTOLOAD
, I no longer get this warning, but the code fails with the following:
Fatal error: Class 'DOMPDF' not found in /var/www/rfq/test.php on line 115
The following is the code:
require_once("/var/www/dompdf-master/dompdf_config.inc.php"); $dompdf = new DOMPDF(); // this is the line that fails $dompdf->load_html($quotehtml); $dompdf->render(); $dompdf->stream("rfq".$_REQUEST['quoteid'].".pdf");
This is Ubuntu 12.04, up-to-date on patches, with default Apache settings.
Thanks so much.
The “Failed to Load PDF Document” error message indicates that the web browser you are using, Google Chrome, is trying to open the electronic transcript within its own native PDF viewer. Because the transcript is a secured PDF, it must be opened with Adobe Acrobat Reader.
Dompdf is a query based on the Laravel framework that will help generate a pdf file. It can be integrated in any environment, based on a Laravel framework.
dompdf/lib/php-font-lib/classes/
directory.src/FontLib/
folder and paste that into your newly created directory.That seemed to work for me.
This is a temporary issue after the DOMPDF project moved to Github. See the answers to this question. The easiest solution to get the complete package is to download DOMPDF 0.6 beta 3 from Google Code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With