html -> PDF conversion in PHP - class / service recommendations?

I'm looking to convert html into pdf in my php code and have been trying my hand at various classes and services available. What I need to do is convert my simple HTML invoice into a PDF and send it as an attachment. The existing classes seem to be quite complicated and resource heavy (opinion based upon comments from other users).

Do you have any specific recommendations?

Replies

  • Manish Goyal
    Manish Goyal
    Ignore everything and use wkhtmltopdf

    wkhtmltopdf

    Wkhtmltopdf is not a php class it is a linux utility, so your server must have it installed

    you can use it inside php using exec()

    exec(wkhtmltopdf x.html x.pdf");

    It is best according to me
  • Kaustubh Katdare
    Kaustubh Katdare
    Interesting suggestion, #-Link-Snipped-# . I'm wondering if using a php class based solution would be a better option. My requirements are super-basic; I only want a basic CSS+HTML conversion into PDF. No tables and fancy fonts at all.
  • Manish Goyal
    Manish Goyal
    In that case DOM PDF is also good, wkhtmltopdf will simply convert html design into pdf as it is without any variation, also there are no issues of memory leak or anything for large html page

You are reading an archived discussion.

Related Posts

Pinch zoom is a key feature of mobile browsing, which allow you to to zoom in to read content and out to locate content within a page. I am trying...
Dear sir/Madam, I need to know the exact Quality Policy in a Simple way as i searched over internet and found out some points. But need more simple guidance for...
There is a 1 year course called Graduate Marine Engineer offered by some Marine engineering colleges in India. Is it a good option or not?? Here is the link How...
Hello CEans! I am working on making an altimeter with real time monitoring for an RC plane that goes up 150 feet. As for my background, I have not done...
Quote: One day, perhaps, you were peacefully strumming your guitar when you decided that it just wasn't good enough. Or maybe it is just good enough, but you wish it...