What resolution/dpi on OS X?

346 views
Skip to first unread message

rogerjonssson

unread,
Jan 26, 2015, 12:18:24 PM1/26/15
to wkhtmltop...@googlegroups.com

Hi,

A few days ago I downloaded and tried wkhtmltopdf (0.12.2.1). I get a resolution/dpi of 93.6 with this html:
http://lineaudio.se/bla/Ugga.html
The 4 "D"s printed are supposed to be spaced 100mm at 96dpi. At first I tried 600dpi as the manual says, but as everything got HUGE so I figured it was working at screen resolution96dpi, but it seems to not do that either. I get about 93.6dpi and it also seems to vary slightly with what I input. Changing the margins sometimes affect the scaling.

What is the default resolution/dpi supposed to be?

The dpi settings have no effect. According to the manual they should not have an effect (X11), but the resolution should be 600dpi, so that doesn't seem right. Are the dpi settings supposed to work or not? 

I am on mac os x 10.8.5 and I input this into the terminal:
Rogersmacmini:~ roger$ wkhtmltopdf --grayscale -L 0 -R 0 -T 0 -B 0 /Users/roger/Desktop/Ugga.html x.pdf

rogerjonssson

unread,
Jan 27, 2015, 10:23:46 AM1/27/15
to wkhtmltop...@googlegroups.com
I found the --disable-smart-shrinking option. Now the pdf is, not 72 dpi, but around 74.8 dpi (377 pixels became 128mm, with the testfile in my last comment).
Mac OS X is nowadays 96dpi, but I guess wkhtmltopdf is X11. Is X11 72 dpi? Why do i then get 74.8 with wkhtmltopdf?

Additonal --zoom 0.78125 gives me 96dpi, it seems (as an example):
wkhtmltopdf --grayscale --disable-smart-shrinking --zoom 0.78125 -L 0 -R 0 -T 0 -B 0 /Users/roger/Desktop/Ugga.html x.pdf

But can I be sure that printout will always be the right size, with this compensation?

rogerjonssson

unread,
Jan 28, 2015, 9:29:21 AM1/28/15
to wkhtmltop...@googlegroups.com
If I use mm instead of px and do:
table style="position: absolute; top:10mm; left:10mm; width:100mm; height:100mm"
I get a square that is 127mm (with --disable-smart-shrinking)

Hm. ???
Reply all
Reply to author
Forward
0 new messages