Converting HTML pages to PDFs

Discussion in 'PHP' started by pwaring, Aug 6, 2009.

  1. #1
    Do people have any recommendations for PHP scripts/classes which can convert HTML to PDF? Ideally I want to convert existing remote pages (on the same site, but they're dynamically generated so I can't just grab the file from the disc) to PDFs, rather than generating a PDF from scratch.

    I've found a few projects on the Web which claim to be able to do this, but many of them are out of date (some haven't been changed since 2006, which makes me worry about security holes) and/or appear to have been abandoned by their developers.
     
    pwaring, Aug 6, 2009 IP
  2. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Quick google search revealed this: digitaljunkies.ca/dompdf/

    It appears to be active since the last post was in may this year. You may want to try it out.
     
    premiumscripts, Aug 6, 2009 IP
  3. pwaring

    pwaring Well-Known Member

    Messages:
    846
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    135
    #3
    I've tried dompdf, unfortunately it doesn't seem to be able to cope with nested tables, and the site I'm trying to get it to work with has lots of them. :(
     
    pwaring, Aug 6, 2009 IP
  4. oop

    oop Peon

    Messages:
    35
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    use

    HTML2PDF

    its on sourceforge
     
    oop, Aug 7, 2009 IP
  5. pwaring

    pwaring Well-Known Member

    Messages:
    846
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    135
    #5
    According to SourceForge, html2pdf hasn't been updated for over 4 years, so I doubt it is particularly secure.
     
    pwaring, Aug 14, 2009 IP