Question

I'm using PDFKit in Ruby on Rails like this:

kit = PDFKit.new("http://#{base}#{parameters}", :pagesize => "Letter")
location = "/var/www/#{url.split('/').last}.pdf"
kit.to_file(location)

It produces multiple pages in a letter size. I don't plan to print these, though, and I'd like them to be one continuous PDF.

I've tried passing Custom to pagesize, which I got from this answer, but to no avail. It errors out with Unknown long argument --pagesize.

Is this possible? How?

Was it helpful?

Solution

Wkhtmltopdf does not support one long page as page size. This is due to the version of QT, which does not support this type of behaviour.

Your alternative is only to either rebuild the whole thing yourself and patch QT / webkit / wkhtmltopdf or use a paid service like HTM2PDF or PDFmyURL or something similar.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top