From cbc367581db1c78813870c61ee16dd8b7aecde12 Mon Sep 17 00:00:00 2001 From: Jevon Wright Date: Wed, 17 Jan 2018 15:43:43 +1300 Subject: [PATCH] Add caveat on different DPI scaling on Windows/Linux See https://github.com/mileszs/wicked_pdf/issues/714 and https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2184 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c3a43d83..5ea32c87 100644 --- a/README.md +++ b/README.md @@ -392,6 +392,8 @@ However, the wicked_pdf_* helpers will use file:/// paths for assets when using If one image from your HTML cannot be found (relative or wrong path for ie), others images with right paths **may not** be displayed in the output PDF as well (it seems to be an issue with wkhtmltopdf). +wkhtmltopdf may render at different resolutions on different platforms. For example, Linux prints at 75 dpi (native for WebKit) while on Windows it's at the desktop's DPI (which is normally 96 dpi). [Use `:zoom => 0.78125`](https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2184) (75/96) to match Linux rendering to Windows. + ### Inspiration You may have noticed: this plugin is heavily inspired by the PrinceXML plugin [princely](http://github.com/mbleigh/princely/tree/master). PrinceXML's cost was prohibitive for me. So, with a little help from some friends (thanks [jqr](http://github.com/jqr)), I tracked down wkhtmltopdf, and here we are.