0

I have this question, just in theory.

I do some query results and there displays a html page, can i insert a download link there which makes me download the html file but as a pdf?

Thanks

Gazeta Almedicus
  • 52
  • 1
  • 1
  • 7
  • 2
    [Google is your friend](http://www.google.com/search?q=php+html+to+pdf) as is the [search](http://stackoverflow.com/questions/1383213/pdf-to-html-conversion-in-php) [in](http://stackoverflow.com/questions/2330883/dynamic-html-to-pdf) [Stackoverflow](http://stackoverflow.com/questions/9825433/how-to-convert-dynamic-contents-of-html-page-to-pdf) – DaveRandom Jun 18 '12 at 20:57
  • google is my bible in fact.. i've searched some but i came to see a lot of options, i wanted to know a good solution.. – Gazeta Almedicus Jun 18 '12 at 20:58
  • [To prevent your question from being flagged and possibly removed, avoid asking subjective questions where... every answer is equally valid: `“What’s your favorite ______?”`](http://stackoverflow.com/faq#dontask). I'm not trying to discourage/attack you here, I just feel that `this question will likely solicit debate, arguments, polling, or extended discussion`. – DaveRandom Jun 18 '12 at 21:03

4 Answers4

2

After searching a lot, I came across this tool: http://code.google.com/p/wkhtmltopdf/ It must be run as external binary, so you probably need a dedicated server/VPS (won't work on shared hosts), but appears to be the best available.

It is based on the WebKit engine (the same used by Safari and Chrome, plus their mobile versions), so it is probably the most accurate PDF generator available (for free!).

ItalyPaleAle
  • 7,185
  • 6
  • 42
  • 69
0

You can. You just have to write the code to do so. Perhaps some searching would have helped you find this.

Community
  • 1
  • 1
bluevector
  • 3,485
  • 1
  • 15
  • 18
  • Quite a lot of those are x-platform, but some are .net only as per that question - the OP here is on PHP. – halfer Jun 19 '12 at 07:45
0

This is probably the best one out there. Html2PDF. It has a lot of features for you.

http://html2pdf.fr/en/default

n0nag0n
  • 1,575
  • 1
  • 17
  • 25
0

There is a module for Zend Framework called Zend_Pdf. Example is here : http://framework.zend.com/manual/1.12/en/zend.pdf.usage.html

pliashkou
  • 4,052
  • 2
  • 31
  • 39