how do i convert 72dpi into 300dpi using dompdf

1,034 views
Skip to first unread message

$hAil-pARAs

unread,
Jun 2, 2013, 3:58:41 AM6/2/13
to dom...@googlegroups.com
Hello.

I am using DOMPDF to convert html to pdf and

phmagick to convert pdf to image.

both are working fine. but

pdf and image are creating of 72dpi which is not good for print.

So, i thought 300dpi for print but i have no idea how to do that.

I have converted my html as 300ppi and now tried to convert in pdf with 300 dpi.

i have searched in google but didn't get any thing useful.

So any body have any idea about that, please help / share.


BrianS

unread,
Jun 5, 2013, 1:09:58 PM6/5/13
to dom...@googlegroups.com
PDFs, at least per the spec used by dompdf, are fixed at 72ppi. Setting DOMPDF_DPI basically affects how dompdf translates coordinates/measurements from HTML to PDF. This really shouldn't matter for text, lines, or shapes since these are vector elements in the PDF. For graphics you should be able to use a large dimension and/or high resolution image; I recommend a large dimension image that is sized in the HTML independent of the actual resolution. I'll have to refresh my memory on this, but I don't believe images are resized when placed, though some formats may be set at 72dpi during processing.

I don't really know about phmagick. Feel free to post some examples of the PDF and image output for us to compare.
Reply all
Reply to author
Forward
0 new messages