iPDFdev Tips & Tricks for PDF development

What’s the resolution of pdf files?

July 06th, 2016

Many people ask what is the resolution of PDF files and the answer is NONE.

PDF files are vector files and they DO NOT have a resolution. The resolution comes in place when the PDF pages are converted to raster images. The size of a PDF page is given in points (1/72 inches) or inches, which are real world measure units.

When the PDF page is converted to image, the size of the image is given in pixels, a "virtual" measure unit, as pixel has no real world size. As there is no direct relation between points and pixels, the resolution is used to specify the transformation.

The resolution says how many pixels in the output image correspond to an inch in the input PDF page. A 96dpi (dots per inch) resolution specifies that an inch in the PDF file is converted to 96 pixels in the output image. Likewise, 300dpi resolution means that an inch in the PDF file is converted to 300 pixels in the output image.

The higher the resolution the greater the detail in the output image but also the image has a larger size (in MB). A letter size page (612*792 points, 8.5*11 inches) when converted at 96dpi generates an image of 816*1056 pixels. At 32bpp the image takes aproximately 3.3 MB (uncompressed RAW image data). At 300dpi the image is 2550*3300 pixels and it takes about 32 MB.

What are people talking about when they say I have a 300dpi resolution PDF file?

They mainly refer to PDF pages that include a single image that covers the entire page or a part of the page. The resolution is used here to specify the reverse mapping. The image itself does not have a resolution, it is just a bunch of pixels. When the image is drawn on the page, the
area it takes on the page is given in points.

The resolution specifies here how many pixels from the image are fitted in an inch. So 300dpi here means that 300 pixels are drawn inside of an inch on the page. The same image can be drawn multiple times on a page at different size, so each drawing instance will have its own resolution. For example let's say you have an image of 300*300 pixels. The image is drawn 2 times on the page, once in a square of 1*1 inches and next another square of 2*2 inches. The first drawing instance will be 300dpi while the second will be 150dpi (300/2).

How are the images scaled when rendering the PDF pages?

Most of the time the PDF pages end up being displayed on a raster device, either a screen or a printer.

Since we have a resolution for drawing the image on the page and we have a resolution for converting the PDF page to raster, how are these resolutions combined to create the output image?

Let's assume we have a letter size page (8.5 * 11 inches). The page includes an image of 2550*3300 pixels that covers the entire page (the image is drawn at 300dpi). The page is printed on a printer at 600dpi. The output print will be 5100 * 6600 printer dots (8.5*11 inch * 600 dpi). The image inside the PDF file covers the entire page, its printed size will be 5100 * 6600 printer dots. Since the image size is only 2550 * 3300 pixels, it will have to be scaled up to 5100 * 6600 pixels so that each pixel in represented by a printer dot.

Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.