Pages

Tuesday 22 March 2011

Batch converting html files into pdf and no pagination

i came across a wicked utility for OSX built on webkit and rubyCocoa called wkpdf
you can install it via:

sudo gem update --system

sudo gem install wkpdf
gem update wkpdf

then navigate to a folder of html files in the command line and issue this command to loop through and process all of them
for i in *.html; do wkpdf --source "$i" --stylesheet-media screen \ --print-background yes --paginate no --output $i.pdf; done

No comments:

Post a Comment