1

I'm trying to understand how to deal with what I think is a rather confusing inconcistency between the system resolution PPI of Windows and what is the PDF reader settings, in this case I'll speak about Adobe Reader, though I've faced the same issue also with Sumatra PDF reader.

Basically what I'm experiencing can be reproduced with the following steps:

  1. Get/create a picture of any size, let's say for ex. 900w x 650h pixels
  2. Convert the image to PDF (via either Acrobat, Photoshop, ImageMagick, w/e)
  3. Open it in a PDF reader at "Actual size" or 100% zoom view

Now if I compare the opened PDF file with the same image opened from an image viewer, be it Irfan, windows default app or else, I see that the displayed "Actual size" of the PDF file is roughly 1/3 bigger than the normal image displayed in the image viewer, resulting in a stretched pixelated image. To be correctly displayed the image as intended I have to set the PDF reader to a ~66% zoom.

This is, I think, due to a weird inconcistency between what the PDF reader see is the current system resolution (in my case Windows 7) of 96ppi. If I change Adobe Acrobat display setting to a custom value of 72ppi, the image is correctly displayed at 100% zoom, just like in the image viewer program.

I've tried wrapping my head around this, and found some info in this other question on GD and in this MS blog spot; from the latter, this part is interesting IMO (emphasis mine):

Windows “solution” to this problem

The Windows solution was somewhat controversial. The decision was made to report the resolution of displays on Windows as about 1/3 greater than actual resolution. This roughly corresponds to the increased reading distance. So, for displays around 72 PPI, Windows would indicate 96 PPI. When IBM came out with the 8514 display, which was around 96 PPI, we added a new resolution for 120 PPI.

I’m not sure about other potential solutions that were investigated—like some type of a zoom factor, but the solution chosen was quite easy to integrate into the system.

I don't know if this is the cause, but fits pretty well.

Why is this happening? Can you reproduce the same issue or is an isolated case on my machine?
What should I do to make it sure that if some user view a PDF at 100% it's displayed at the intended resolution? (the same he would see if he opened the same image file in a image viewer application)

NB. I can't avoid to use PDF files, so using a normal raster image is not an option.

3
  • Wow, I can't see bolds on Firefox Dev, interesting ..
    – Gruber
    Commented Sep 12, 2017 at 22:44
  • 2
    Side note: I think you are chasing at shadows here. Your question is predicated on several assumptions about the client application: specific OS, specific pixel density, specific aspect ratio, specific logical pixel dimensions for the display. None of these are controllable and few of them are universal. The majority of your PDFs may be viewed on an iPhone in portrait orientation. etc. This may be a time to learn to stop worrying.
    – Yorik
    Commented Sep 13, 2017 at 16:35
  • @Yorik yes indeed.. I was hoping to find something more general to use. But I guess that simply put it's better to not use PDF files to show raster images, if you what you really mean is to show raster images. Though it's the only simple and common file format available XOS to display with easy multiple pages with raster graphics AFAIK.
    – Gruber
    Commented Sep 14, 2017 at 4:33

2 Answers 2

2

I don't use Reader (it seems to conflict with Acrobat). However, with Acrobat you have to tell the app the pixel density to use.

By default Acrobat will use the system ppi settings which may or may not be accurate for PDFs on the monitor you are using. Most operating systems will default to some predetermined value based upon the overall capabilities of the display. Acrobat uses that default setting for pixel density unless it's changed. I'm assuming Reader is very similar to Acrobat here and does the same thing.

So, you need to calculate the actual pixel density of the monitor you are using.

Note my Acrobat settings below... (using Acrobat X - the last GOOD version) it shows the system default of 108 pixels on the left, however the correct pixel density for Acrobat to show things at the proper size on my display is 98ppi. So, I input 98ppi and use the Custom field. You probably need to do the same.

enter image description here

To figure out the pixel density of your monitor, I could try and explain the Wikipedia article and essentially get into a lot of explaining when you can just read the article.

Or, you can use an online calculator making life so much easier... here's a good one ---- Calculate the pixel density of a screen by clicking here

Note all this is for your system it will not alter how the PDF displays on any other system unless the PPI preference for Acrobat is changed on that system as well.

1
  • I'll mark your as correct answer because it helped reaching the real point in this: you need to set the PDF PPI to the same amount used by the reader program to have a 1:1 ratio with pixels on display for raster content. Unfortunately as you pointed out, this is probably different on every system, and there is no way to set embedded in the PDF file a pseudo "Required PPI resolution" metadata.
    – Gruber
    Commented Sep 14, 2017 at 4:36
0

Thanks to @Scott suggestions, in the end fiddling around I managed to obtain what I wanted.

I'm not completely sure about it, but basically the problem arise when the PDF is created from "raw" raster files, I think the file is created with a default DPI/PPI (PPI from now on) value of 72; I do know that ImageMagick default PPI -density value is 72 if none is given in the conversion process, I haven't found any info on the default value for Acrobat Pro. (To be precise though, the PPI is bind to the image inside each PDF page, not the PDF file)

The Acrobat PDF reader is set to display items by default with the OS PPI value (in my case on Windows 7 case it's 96 PPI). This way the resulting displayed PDF file will necessarily look pixelated and streched, since the expected PPI is 96, but the converted PDF is set to 72.


You need to set the created PDF PPI value to the same page display resolution value of the PDF reader program used.

This is how I solved for my specific use case* using ImageMagick to create the PDF from a group of jpg files:

magick convert -units PixelsPerInch -quality 65 -density 96 *.jpg output.pdf

* As @Yorik suggested though, this is indeed a pointless chase, as basically any OS or program could have different settings and defaults. Luckly the file is displayed on Windows PCs similar to mine so it should be fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.