en  fr 

Webkit2pdf


 

What is Webkit2pdf?

Webkit2pdf is a little tool designed to fetch web pages and export them to numbered PDF files (or to print them). It allows specifying paper size and output directory. It is released under the terms of the GPL, version 2 or later.

Get Webkit2pdf

Webkit2pdf currently works on POSIX platforms like GNU/Linux. It should be portable to Windows, but I have currently no interest in doing that.

Webkit2pdf is also available pre-packaged in various Linux distributions, like Debian, Ubuntu, Mandriva, SuSE, Gentoo, and maybe more. Simply use your normal package manager to install Webkit2pdf.
If you want to compile Webkit2pdf from the sources, you will need Webkit, GTK+, Poppler-glib, and their respective development packages. Webkit must be version r42436 or newer.

What use is Webkit2pdf when I can just hit File/Print in my browser?

I wrote Webkit2pdf to be able to export more than 200 posts from my wife's pregnancy blog. It allowed us to print it (via lulu.com) as a future souvenir for our son, without using a whole week-end doing it manually. I just had to tweak the blog's "print media" CSS for a very good-looking result. (See screenshots!)

I would like to use webkit2pdf without an X server, like over ssh?

You can simply use XVFB, the X Virtual FrameBuffer:

xfvb-run -a webkit2pdf -f test.%04d.pdf http://webkit2pdf.sf.net/

GUI
CLI
Example output

Screenshots

GUI
The graphical user interface
CLI
The command-line interface
Example output
Example output (printed by Lulu.com)
 

Contact

Please report bugs on the bug tracker. You can also email Colin, the author.