Introducing wkpdf: A command-line HTML to PDF converter for Mac OS X
I proudly announce the first public release of wkpdf. wkpdf is an HTML to PDF converter for the command-Line.
Although there are plenty of browsers available for Mac OS X, I could not find a command-line tool that allows for downloading a website and storing the rendered website as PDF. This was my motivation for creating wkpdf. The application uses Apple WebKit for rendering the HTML pages, thus the result should look similar to what you get when printing the webpage with Safari.
The usage of wkpdf is simple. You can store the PDF for Apple’s website to the file apple.pdf with the following command:
wkpdf --source http://www.apple.com --output apple.pdf
wkpdf is an open-source application and is released under the MIT license. More information and installation information can be found on the wkpdf website http://wkpdf.plesslweb.ch.
I appreciate any feedback on wkpdf, please send comments to wkpdf@plesslweb.ch.
DISCLAIMER: This is the first public version of wkpdf and my first public Mac OS X/Cocoa application at all. wkpdf is work in progress and not all features have been thoroughly tested. Thus please consider wkpdf as alpha version.
I would like to know if there is an equivalent tool in windows ? or do u have a port for win32 ?
Hi Renold
I’m sorry to disappoint you, but I don’t know about similar tools for Windows. Porting wkpdf to Win32 directly is not feasible, because it uses the ObjectiveC interface to WebKit and bases on other Mac OS X technologies that are not available on Windows.
However, the WebKit rendering engine has been ported to many platforms and UI toolkits. Hence, I guess it should be possible to implement a wkpdf-like tool on Windows too.
Using parameter –format A5 gives error:
Fatal error: could not load resource 2, error Error Domain=NSURLErrorDomain Code=-1100 UserInfo=0×14a8d0 “file doesn’t exist”
Support for tables buggy – page break can cut a line of text in half (in the middle of characters)
These are minor things. Nice and useful tool.
Thanks a bunch!
I was trying to achieve the same thing using automater workflow which just did not work as it should.
This worked right out of the box and can be easily scripted. (which saves me days of clicking
Great stuff!