I'm using wkhtmltopdf in windows to create a custom sticker, so I need it to render a specific paper size. According to the documentation, I should use --page-width
and --page-height
but none of them seems to have any effect, however when I tried -s
it does change the paper size. This is my command:
wkhtmltopdf -g --page-width 10 -L 0 -R 0 -T 0 -B 0 sticker.html sticker.pdf
I've also tried to set the units like 10px
, 10mm
or 10in
, and tried with different width. No error or message given, everything works but page size is still A4. What am I doing wrong?
I finally redownloaded and reinstalled the previous version of wkhtmltopdf and it worked. I guess that must have been some kind of installation problem.