...

View Full Version : how to convert the whole html page into pdf using php



xiaodao
02-18-2006, 02:35 AM
hi
how to convert the whole html page into pdf using php?

fci
02-18-2006, 03:16 AM
you could install this on the server:
http://www.htmldoc.org/
or

use this:
http://user.it.uu.se/~jan/html2ps.html
then use ps2pdf:
http://www.cs.wisc.edu/~ghost/doc/AFPL/6.50/Ps2pdf.htm

or:
http://www.digitaljunkies.ca/dompdf/

or:
http://html2fpdf.sourceforge.net/

I've used htmldoc, the main thing I liked about it was speed. not sure how the others fair.

another way which I haven't seen yet would use an installed copy of Firefox/Mozilla on a server to print to PS then convert that to a PDF (this means the PDF would get all the CSS etc) although that doesn't allow any kind of print command line argument (maybe one day it'll happen *sigh*).

xiaodao
02-18-2006, 03:29 AM
but htmldoc is not using php

i would like something that prints php output to become pdf

fci
02-18-2006, 03:33 AM
If you had gone to this site I had linked above, it is written entirely in PHP:
http://html2fpdf.sourceforge.net/

Not sure how great it would be though but hopefully it'll do what you need.

xiaodao
02-18-2006, 03:43 AM
because my boss very lazy, he wants to auto generate

fci
02-18-2006, 03:57 AM
all the other things I linked, even though they weren't written entirely in PHP, you would've been able to call them from PHP.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum