sud_shan
sud_shan

Reputation: 303

Html Content To Pdf Conversion

I want to convert HTML content to pdf. It can be any content i.e. content of a div, table etc.

I have tried jspdf, iText for it but they are not effective.

Among the paid one's pdfcrowd is solving my purpose but I am looking for any open source solution which does not depend third party server.

Please suggest any open source solution to this which can convert html content to pdf effectively(Client Side will be preferable).

Upvotes: -1

Views: 1300

Answers (3)

karel
karel

Reputation: 5884

In Windows, Mac or Linux, install wkhtmltopdf. wkhtmltopdf is a command line utility to convert HTML to PDF using WebKit. You can download wkhtmltopdf from the linked webpage, or in many Linux distros it can be found in their repositories.

Examples

Convert a remote HTML file to PDF:

wkhtmltopdf http://www.google.com google.pdf

Convert a local HTML file to PDF:

wkhtmltopdf example.html example.pdf

wkhtmltopdf usage You can also display wkhtmltopdf help locally by running wkhtmltopdf -H.

Upvotes: 1

Sanjeev Kumar Goswami
Sanjeev Kumar Goswami

Reputation: 105

You can use TCPDF for converting HTML to PDF . its free and good features. I tried and its working perfectly even you can convert all html content like images ,or custom css into pdf without any problem by using TCPDF classes .

You can download form below link: http://sourceforge.net/projects/tcpdf/files/

Regards, Sanjeev Kumar Goswami

Upvotes: 0

Ghanshyam Katriya
Ghanshyam Katriya

Reputation: 1081

You can try htmltopdf for convert HTML content into a pdf. I have used it and it fulfills my all requirements of converting HTML into pdf. http://www.phpclasses.org/package/2905-PHP-Convert-HTML-to-PDF-using-Web-services.html

Upvotes: 0

Related Questions