I'm working on a project that require generating a PDF file from HTML content. I'm using wkhtmltopdf which I believe is the best solution I've came accross so far.
I was wondering if there was a way of generating only a one page PDF.
I have a HTML rendered interface and I want the user to get the same result (let's say 90% similar) on the resulting PDF file.
In the following example the content is still on the first page but wkhtmltopdf generates a second one that contains nothing :
I would like to get a one page PDF no matter the content of the page. I'm using the version 0.12 of wkhtmltopdf and I could not find in the documentation any option that allow to enter the desired number of pages.
I don't know if some of you already encountered such issue and if the solution would be an option flag that I don't know ? Or maybe there is another way ?
I'm generating some multi page PDFs. In some cases only the first page is needed. So I'm using pdftk to output only the first page.
I'm using a command like:
wkhtmltopdf http://stackoverflow.com temp.pdf
pdftk temp.pdf cat 1 output output.pdf
rm temp.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With