grasenhiller / silverstripe-wkhtmltox

BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

WkPdf not found ? #4

Open queenpp opened 4 years ago

queenpp commented 4 years ago

Hi install wkhtmltopdf in C drive and has declared the binary path in .env file as well.

When I have $pdf = new Wkpdf(); this error comes up with my namespace/WkPdf not found.

Any ideas?

Cheers.

sirjeff commented 6 months ago

Hi @queenpp , better late than never? I think the error might be referring to the namespace of Wkpdf Try adding : use Grasenhiller\WkHtmlToX; to the top with the others ( if you haven't already ). Or try $pdf = new \Grasenhiller\WkHtmlToX\Wkpdf();

I got the above info from the namespace in the Mpdf.php file ( source code ) https://github.com/grasenhiller/silverstripe-wkhtmltox/blob/master/src/WkPdf.php

Hope this helps :)