-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Can we create one long PDF page #4299
Comments
|
@PhilterPaper I know, I am a developer and I know the rules. I tried to convert the website to images, then take the image hight then convert it to mm by and use --page-hight , the problem that i got very long PDF page which means wkhtmltopdf add some extra spaces. I need a working solution which provides a clean PDF and 100%$ fit the page content. Please advice |
|
It's been asked many times, but as far as I can tell, no one has ever delivered a foolproof solution. I think the closest anyone has come is to specify a ridiculously long page size (of whatever width you desire), and if the result fits on it, use some utility to trim it down to minimum size. Otherwise, double the page height and try again. Add: One possible C++ code fix would be to output the entire thing to a single standard (A4 or Letter) page, close the output PDF, read it in again, find the most negative "y" value, and add (absolute value) to all "y" values. Maybe it could be done before the PDF is output the first time (does it hold the entire page in memory?), which may bypass any problem with stream lengths changing in the process. Yes, a lot of work. Or, make a dummy first pass which merely finds the most negative "y", and add the offset on the real second pass. Still kludgy, but this is a major architectural change no matter what you do. Or even just change the code to write one page with huge negative "y" values, otherwise in the normal manner, then a new utility looks through the PDF for the most negative "y" and reruns wkHTMLtoPDF with adjusted page height on the command line. All sorts of possibilities. |
|
From --help: Page Breaking ...can webkit be instructed to NOT cut it up? my version: wkhtmltopdf 0.12.4 (with patched qt) |
Can we do that? So there is no page breaking!
The text was updated successfully, but these errors were encountered: