Why png/jpeg renders are in 110pixels/inch? is there any way to change it to 72dpi?

70 views
Skip to first unread message

RUBELUX

unread,
May 22, 2012, 7:17:24 AM5/22/12
to phantomjs
Hi Ariya and phantom guys,

First of all, thanks for all the fantastic work done on Phantom. :)

I'm developing a screenshot services, and technically is done except
for the resolution of the render images that is in 110dpi, I guess
it's a problem of the X11 server setting, but with 1.5 version it
comes build-in,

How could I sort this out?

Huge thanks in advance

Ruben



Milian Wolff

unread,
Jun 1, 2012, 6:03:30 AM6/1/12
to phan...@googlegroups.com
Actually I think the DPI for PDF generation should always 72 be, see webpage.cpp:

    #define PHANTOMJS_PDF_DPI 72

and further down in renderPdf

    printer.setResolution(PHANTOMJS_PDF_DPI);

now for renderImage though... there the DPI is probably the QWebKit default which just might be 110dpi on your machine... Anyhow, if that's an issue you should report it on the bug tracker I think.

Cheers
Reply all
Reply to author
Forward
0 new messages