xxjjnn
xxjjnn

Reputation: 15239

what unit is pdf resolution in and does DPI affect it

When inspecting a PDF file, a 'resolution' can be seen:

PDF file info showing 'Resolution'

In this example the 'Resolution' is 595x841. There is no 'DPI' shown in the above file dialog, however when exporting as PDF it is possible to set the DPI. Regardless of what DPI setting is chosen, the 'Resolution' is always the same.

For A6 'resolution' is 297x419, about half in each dimension.

What unit is resolution measure in, and is it linked directly to the size only, or does the DPI affect it (and I just haven't been setting it correctly?)

Upvotes: 0

Views: 1881

Answers (1)

xxjjnn
xxjjnn

Reputation: 15239

The documentation is not clear, but PDF dimensions (referred to as 'Resolution' by mac file info dialog) are in 'user units' which then correlate to 'points'. Prior to PDF version 1.6, its a 1:1 relationship.

Since PDF version 1.6: There is a setting /UserUnit which is usually 1, and user_points x /UserUnit = points.

A 'user unit' is ALWAYS 1/72 of an inch. So 0.35277777777777775mm per point. (Though you can scale a PDF to fit different sized pages in most print dialogs)

PDFs do NOT themselves have a DPI. PDFs contain things, some of which MAY have the equivalent - text and vector images are scalable and do not, whereas with raster images each one has a 'ppi' (point per inch).

When creating a PDF, you may use a raster image with a very high resolution, but PDFs do 'filtering' on raster images to reduce their resolution so the 'ppi' is similar to the 'DPI' of the page (usually chosen on export of PDF). This means that the smaller you make an image on the page, the lower the resolution it will need to have to have the desired 'ppi'. Thus filtering compresses raster images to stop the PDF being unnecessarily large (filesize) by having lots of unneeded detail.

So in the file dialog, 'Resolution' is always in 'user points', multiply it by /UserPoint to get 'points', and that divided by 72 and is the intended physical size in inches. You can of course print an A4 PDF at A2 size; it just means the embedded raster images will each have half their 'ppi' available to the printer.

Upvotes: 2

Related Questions