0

I have a html page which contains a <div></div> section. There is a link, I would like when someone click on the Link to generate a PDF which contains exactly the div section content.

How can I handle that in PHP or JavaScript?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Mamadou
  • 2,177
  • 5
  • 31
  • 43
  • 1
    possible duplicate of [Best pdf generator in PHP , mpdf or fpdf?](http://stackoverflow.com/questions/1648715/best-pdf-generator-in-php-mpdf-or-fpdf) – Shoban Feb 01 '11 at 16:06

2 Answers2

1

check the php pdf functions here

Muhamad Bhaa Asfour
  • 1,075
  • 3
  • 22
  • 39
  • +1, but note that it relies on a third-party library, which requires a commercial licence to use all its features. (see http://www.php.net/manual/en/pdf.requirements.php for more details) – Spudley Feb 01 '11 at 16:15
1

There are several options, but TCPDF seems to be quite good.

Its a PHP class for generating PDF documents.

Good ratings on the web, and it looks like it's under active development as well. Worth having a look at.

Spudley
  • 166,037
  • 39
  • 233
  • 307