wkhtmltopdf / wkhtmltopdf

Convert HTML to PDF using Webkit (QtWebKit)

Home Page:https://wkhtmltopdf.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different printing on windows and linux

lanlan-yang opened this issue · comments

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

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 :)