linux poison RSS
linux poison Email

Convert webpages (HTML) to PDF using webkit - wkhtmltopdf

Wkhtmltopdf is a command line utility that can be used to convert  a webpage / html to  PDF.

Wkhtmltopdf Features:
 * Convert web pages into PDF documents using webkit
 * Adding headers and footers (static version only)
 * TOC generation (static version only)
 * Batch mode conversions
 * (Linux) No longer requires an XServer to be running (however the X11 client libs must be installed)

Wkhtmltopdf Installation:
Open the terminal and type following command to intall Wkhtmltopdf:
sudo apt-get install wkhtmltopdf
Wkhtmltopdf Usage:
Wkhtmltopdf is command line utility, the following lists some usages for wkhtmltopdf
To convert a remote HTML file to PDF:
wkhtmltopdf http://www.google.com google.pdf
To convert a local HTML file to PDF:
wkhtmltopdf my.html my.pdf
You can also convert to PS files if you like:
wkhtmltopdf my.html my.ps



0 comments:

Post a Comment

Related Posts with Thumbnails