walle / gimli

Utility for converting markup files to pdf files
https://github.com/walle/gimli
MIT License
538 stars 44 forks source link

Gimli 0.5.7 outputs the word 'foobar' rather than name of page using [webpage] #67

Closed cudmore closed 9 years ago

cudmore commented 9 years ago

Gimli outputs pdf with the word 'foobar' instead of the name of the webpage when I pass wkhtmltopdf options using [webpage]. This happens if I use the --default-header, --header-left or a --footer-left etc. For example:

gimli -y -m -s ../css/main.css -w '--default-header' -o ../pdf
gimli -y -m -s ../css/main.css -w '--header-left '[webpage]' --header-right "[page]/[toPage]"' -o ../pdf

Otherwise, gimli is working great, Hope this is a simple fix.

I am using OSX 10.9 and just installed gimli using

sudo gem install gimli

My version are as follows:

gimli -v Version: 0.5.7 /usr/bin/wkhtmltopdf -V wkhtmltopdf 0.9.9

walle commented 9 years ago

That is a weird error :) I've found the error though, it's at https://github.com/wkhtmltopdf/wkhtmltopdf/blob/4de37f916510c1cf21b6bb08c052297b4818c0c2/src/outline.cc#L209

There is work being done to upgrade the wkhtmltopdf binary gem to the current release (0.12.x) https://github.com/zakird/wkhtmltopdf_binary_gem/issues/17#issuecomment-73156647

Until then I don't think there is much to do (after a very quick look at the wkhtmltopdf code), the webpage parameter does not seem to be used in 0.9.9.