Monday, May 14, 2012

wkhtmltopdf - convert HTML web page to PDF


wkhtmltopdf and wkhtmltoimage are powerful utilities to convert HTML to PDF
or an image file using a patched static build of Qt and the webkit rendering
engine.

A webpage can be downloaded directly from the web and rendered into a PDF
document or an image file (multiple formats are supported).

Features of the static version:
* Convert web pages into PDF documents (or images) using webkit
* Adding headers and footers
* TOC generation
* Batch mode conversions
* XServer is not required (however the X11 client libs must be installed)

For proper functionality you may need to install the following port(s):
x11-fonts/webfonts

WWW: http://code.google.com/p/wkhtmltopdf/


Snappy - is a PHP5 library allowing thumbnail, snapshot or PDF generation from a url or a html page.
It uses the excellent webkit-based wkhtmltopdf and wkhtmltoimage available on OSX, linux, windows.


Reference:
https://github.com/knplabs/snappy
http://code.google.com/p/wkhtmltopdf
http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp
http://www.freebsd.org/cgi/url.cgi?ports/converters/wkhtmltopdf/pkg-descr
http://stackoverflow.com/questions/391005/convert-html-css-to-pdf-with-php

No comments: