Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 Posts

    how to convert the whole html page into pdf using php

    hi
    how to convert the whole html page into pdf using php?
    flying dagger

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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*).

  • #3
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 Posts
    but htmldoc is not using php

    i would like something that prints php output to become pdf
    flying dagger

  • #4
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 Posts
    because my boss very lazy, he wants to auto generate
    flying dagger

  • #6
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •