Wkhtmltopdf: Different printing on windows and linux

Created on 30 Jan 2015  路  4Comments  路  Source: wkhtmltopdf/wkhtmltopdf

Same command:
wkhtmltopdf --page-size a3 http://localhost:8080/PDFTest/create_PDF.action /var/www/webapps/PDFTest/pdfFile/order.pdf

result for windows 8.1:
image

result for centos 5.5
image

Question

Most helpful comment

It's the other way round, on Linux it prints at 75 dpi (native for WebKit) while on Windows it uses the desktop's DPI (which is normally 96 dpi). You can use --zoom 0.78125 (75/96) to get the same effect on Linux.

All 4 comments

image

Hello,

Have you found a solution to this issue? I get the same kind of error. When I print in A4 on Windows, it fits perfectly, while on linux, it seems like everything is zoomed in

Thanks,
Fabien

It's the other way round, on Linux it prints at 75 dpi (native for WebKit) while on Windows it uses the desktop's DPI (which is normally 96 dpi). You can use --zoom 0.78125 (75/96) to get the same effect on Linux.

@ashkulz Thanks, that's perfect :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marcrib picture marcrib  路  3Comments

8176135 picture 8176135  路  3Comments

monejava picture monejava  路  4Comments

alankarglobant picture alankarglobant  路  4Comments

ghost picture ghost  路  4Comments