views:

58

answers:

3

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).

A: 

Check out html2pdf, I never used it, but it looks promising.

Maerlyn
A: 

Found this yesterday just here at SO: mPDF. Haven't tried it, but the documentation is solid.

djn
+1  A: 

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

Ashay