Currently when converting the PDF from given URL, like:
wkhtmltopdf http://superuser.com/ superuser.pdf
where it consist multiple A4 pages (so sometimes images are cut in the middle of the page).
My question is:
How do I convert HTML page into PDF format where the height is endless?
My preference is that you still should have editable/searchable document, not just an static image.
What I've tried already:
-
I couldn't find any valid paper size for that (which seems doesn't work anyway),
-
I've seen already: Auto page size based on content size at GitHub
Best Answer
The wkhtmltopdf 0.9.6 Manual documents this parameter :
Therefore defining an enormously long page can be done via :
which both define a page of height of 100 meters (I mention both in case your wkhtmltopdf does not support
m
).Not using
wkhtmltopdf
, I do not know if there is some upper limit to page-height, but you can find that empirically.In addition you can try to add
--disable-smart-width
(width is not an error) and try for the moment the less ambitious--page-height 100cm
.In this man page there is a comment about
disable-smart-width
that it's only available using patched QT.There is also another comment:
The project has moved elsewhere, so you might hunt there for such a version, or ask in the forums.