Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different scaling on Windows and Linux #714

Closed
soundasleep opened this issue Jan 17, 2018 · 3 comments
Closed

Different scaling on Windows and Linux #714

soundasleep opened this issue Jan 17, 2018 · 3 comments

Comments

@soundasleep
Copy link
Contributor

I was having an issue where rendering PDFs on Windows and on Linux would render with different sizes, even though the underlying version of wkhtmltopdf was the same.

Upon further investigation this issue seems to lie with wkhtmltopdf and its interaction with Linux/Windows:

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.

Would it be worth adding this caveat to the README? Alternatively (my preference), to scale the 'zoom' factor provided to wkhtmltopdf by (1.0/0.78125) if the user is on Windows?

@unixmonkey
Copy link
Collaborator

I think an addition to the README is more appropriate. That behavior is different not only by OS, but what resolution of monitor you have, and changing a default is bound to break for a great number of users.

@soundasleep
Copy link
Contributor Author

How's this? #715

@unixmonkey
Copy link
Collaborator

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants