dpi attribute

Used By:img
See:height width

The dpi attribute sets the dpi of the image when it's placed in the PDF. Most images don't have a set physical size, only a size in pixels, so this method can be used to control the size of the image. If the width or height attributes are set for the image, these will take precedence.

Assuming the image "image.gif" is 500 pixels square, both the following lines result in an image that's 1 inch by 1 inch.

<img src="image.gif" dpi="500"/>
<img src="image.gif" width="1in" height="1in"/>