I have very limited access to enable extensions etc on my hosting but am looking to generate a PDF from an HTML page (with css/images) through PHP.
Any ideas how I can achieve this with next to zero CL access etc? Preferable not a "hack" / relient on a service (as I'll be looking to use this long term).
When generating HTML to render in to the PDF, create that HTML in single $html variable. This can be used to pass to the any of the pdf rendering api's.
Widely used API's are DOM PDF, html2pdf, html2ps.
Some of the API's like html2ps also supports the external css & classes also. Some required inline CSS.
I have used DOM PDF & html2ps
here are the links
domp df
HTML2PS & HTML2PDF
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