0
votes

I've been playing around with cakepdf plugin and dompdf in order to generate pdf files. I've got it working, but had to manually add the reference to the dompdf class as this :

require_once( '... path to ... /vendor/dompdf/dompdf/lib/Cpdf.php' );

inside the controller.

From the cakephp perspective, where should I add the 'require_once' command ?

Thanks. Regards.

1
Ideally nowhere, as it should not be necessary. github.com/dompdf/dompdf/issues/1132#issuecomment-218646827. Please always mention the exact versions of the software that you are using, ie the exact CakePHP and CakePDF version, also always add some context, for example mention the engine that you are using and show how you've configured it, so that people might be able to reproduce your problem! - ndm
thanks. I'll keep in mind your recommendations for future posts. - user1077915

1 Answers

0
votes

The new version of Dompdf it's compatible with namespace but it's not incude in cakepdf.

You can use this plugin to edit pdf with Dompdf