Convert HTML to PDF
In this thread you will find a list of “HTML to PDF” converters, e.g.:
- WKhtmlToPDF (blog post)
- DOMPDF
- Htmldoc
- HTML2PDF
- Prince XML (free for non-commercial use)
- etc.
WKhtmlToPDF
“Simple shell utility to convert html to pdf using the webkit rendering engine, and qt.”
You can get its binary executable here. Then, you can convert an html to pdf like this:
wkhtmltopdf-i386 test.html test.pdf
The result will be similar to exporting the page in PDF in a browser. This is not a surprise, wkhtmltopdf contains the WebKit rendering engine.
Advertisements
Categories: html, php
convert, html, html2pdf, pdf, prince xml, webkit, wkhtmltopdf
I would say it is the perfect solution, although executable size is large than usual but it works perfect with inline css or whatever. I now use this one to render my html lectures in pdf.
Thanks for sharing…
Here is my pdf converter solution in c#, share with all, welcome all suggestions.
http://www.rasteredge.com/how-to/csharp-imaging/pdf-converting/
On the linked page I see solutions to convert PDF to something else. But we need the other direction. Can you convert HTML to PDF with your converter?
Yep, I see it was mistake to offer the above link, here is the right HTML to PDF cpnverting solution
http://www.rasteredge.com/how-to/csharp-imaging/pdf-convert-html/