page-height and page-width not working in wkhtmltpdf 0.12.0

3,888 views
Skip to first unread message

Srinivas Shetty

unread,
Jul 11, 2014, 9:11:27 AM7/11/14
to wkhtmltop...@googlegroups.com
Hi All,

I am facing issue while using page-height and page-width with wkhtmltpdf 0.12.0.

Below is my command. I don't see any change in the output document.

wkhtmltopdf --page-height 3000mm D:\\HTMLS\\arcbold.html D:\\HTMLS\\page-height
.pdf

wkhtmltopdf --page-width 3000mm D:\\HTMLS\\arcbold.html D:\\HTMLS\\page-height_width.pdf

However, the options are working in combination..


wkhtmltopdf  --page-height 3000mm --page-width 3000mm D:\\HTMLS\\arcbold.html D:\\HTMLS\\page-height_width.pdf

Could you please let me know why the options are not working individually?

Thanks,
Srinivas

mn4367

unread,
Aug 1, 2014, 6:02:02 PM8/1/14
to wkhtmltop...@googlegroups.com
If you override the default page size (A4) by giving only one dimension (for example the page width) I believe it is simply ignored. I think this is OK. What page height should wkhtmltopdf use in this case?

Dibyendra

unread,
Sep 20, 2015, 12:22:18 AM9/20/15
to wkhtmltopdf General
Hi,

I also want the page output to be 56mm long (height) and 88mm wide but the  following command doesn't work at all:

wkhtmltopdf -d 300 -L 0 -R 0 -T 0 -B 0 -–page-height 56mm -–page-width 88mm page.html out.pdf

Any help would be appreciated, thanks!

Dibyendra

unread,
Sep 20, 2015, 2:05:54 AM9/20/15
to wkhtmltopdf General

Hi,


I want the PDF output to be 56mm long (height) and 88mm wide (width).


I have tried wkhtmltopdf -d 300 -L 0 -R 0 -T 0 -B 0 -s Custom -–page-height 56 --page-width 88 page.html out.pdf but it doesn't execute.

But if I specify only the width, it executes but with the following output along with error:

wkhtmltopdf -d 300 -L 0 -R 0 -T 0 -B 0 –-page-width 88 page.html out.pdf
Loading pages (1/6)
Error: Failed loading page http://xn---page-width-lg3f (sometimes it will work just to ignore this error with --load-err
or-handling ignore)
Error: Failed loading page http://88 (sometimes it will work just to ignore this error with --load-error-handling ignore
)
Exit with code 1 due to network error: HostNotFoundError

This means, does this mean the -page-width and --page-height options are not available to the wkhtmltopdf 0.12.2.4?


Thanks!

Reply all
Reply to author
Forward
0 new messages