Thread: html 2 pdf

    #1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2004
    Location
    Boston, MA USA
    Posts
    532
    Rep Power
    50

    html 2 pdf


    Hi:
    I have a business management tool that is written largely in PHP/MySQL with some JavaScript for the UI / forms.

    I would like to convert some pages to pdf on the fly, so that when a customers views their invoice (a PHP file), they have the option to download a copy as a pdf file. Or... from the back office create a pdf file for every customer invoice and append it to an automated email as an attachment.

    Does anyone have a recommendation for a good HTML (PHP) to PDF converter that will plug-in easily to a largely PHP application. I have downloaded "html2ps-2.0.43" but the code is from 2008 and makes use of a lot of deprecated functions.

    Anyone have any alternative suggestions?

    Thanks
  2. #2
  3. Wiser? Not exactly.
    Devshed God 2nd Plane (6000 - 6499 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    6,126
    Rep Power
    4103
    Do you need a pure PHP solution, or are non-php tools an option?

    I've been using html-pdf lately for this task and it seems to work pretty well.

    TCPDF has a writeHTML method that can handle some basic HTML.
    Recycle your old CD's



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2004
    Location
    Boston, MA USA
    Posts
    532
    Rep Power
    50
    Originally Posted by kicken
    Do you need a pure PHP solution, or are non-php tools an option?

    I've been using html-pdf lately for this task and it seems to work pretty well.

    TCPDF has a writeHTML method that can handle some basic HTML.
    I'd like a PHP solution if possible. I'm trying to minimize the number of languages for simplicity's sake.

    That said, I notice that "html-pdf" uses "phantomjs" which I am not familiar with. I assume it's a variant of JavaScript. Will I need have this loaded on the hosting company's server or can I load it beneath the path of my application?
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2017
    Location
    Worldwide
    Posts
    35
    Rep Power
    1

IMN logo majestic logo threadwatch logo seochat tools logo