开发者

DOMPDF Image quality

I would like to know why the quality of my image is low in DOM PDF.

The following image: http://img517.imageshack.us/img517/6996/top3.gif

The borders are 1px and everything looks sharp.

If I include the image in a HTML document with DOMPDF, everything works great, but the quality of the image is not really sharp.

Output: img88.imageshack.us/img88/3801/screenshot20100625at110.png

I'm including it with the following code开发者_C百科:

<p><img src="img/pdf/top.gif" /></p>


This could just be a problem with how the PDF is displayed on the screen. If you set your DOMPDF_DPI value to the same as the image, then there should be a one-to-one correspondence between the image dimensions and its dimensions in the document (try a value of 72). I'd wager that unless the zoom level at which you are viewing the PDF is such that the DPI matches exactly between the screen and the PDF that the image will not look quite right since it will need to be scaled.

Your PDF looks like something that is intended to be printed, have you tried printing it out to check the quality? If it doesn't look good you might try adjusting the value of DOMPDF_DPI and/or specifying dimensions of the image.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜