I scanned a text at 600dpi and it turned out to be much more than I needed to make a PDF out of it. I've already OCR'ed the text and I want to retain the OCR in the PDF.

I want to decrease the number of pixels (dpi? Sorry, I'm not sure what I'd call them, I'm not used to image processing), so I can make the PDF size smaller. The images are too big when I open the PDF, it would be fine to shrink them by decreasing the number of pixels (as it is now, I can zoom in the images much more than I need).

How can I shrink image size by reducing the number of pixels(dpi))?

I don't want to re-print the PDF, or rescan it, because I don't want to lose the OCR. I tried using Adobe Acrobat Pro DC "Save as Optimized PDF", and shrank all images above 50dpi to 50dpi. It made the PDF bigger! (I think the PDF is already compressed; but I don't want compression, I want to reduce the number pixels/the resolution)

I'm on Windows 7, 64 bit

  • But now I'm thinking... Is it possible to reduce the image length/resolution and preserve the OCR? It maybe impossible, because the OCR would not correlate to the text position in the image – flen Jul 25 '17 at 1:17
  • BTW, OCR is typically optimized for approx. 300 dpi. If you want to OCR really tiny text, you can scan at a higher resolution, but if you're scanning normal text at 600 dpi just for OCR purposes, it won't buy you anything except a huge file. – fixer1234 Jul 25 '17 at 4:40

I think you were on the right track with Acrobat Pro.

You need to change the actual image resolution though. You could do this by manually creating a low-res version (e.g. 50% W x 50% H) and replacing the existing image in the pdf with your new one. In this case, the image dpi inside the pdf would need to be halved too in order to preserve the size. If you kept the same dpi it would appear a quarter of the size.

As long as the document dimensions don't change the OCR text should be mapped to the same spatial coordinates.

Edit: batch processing using Acrobat Pro

Below you can see Acrobat Pro (XI) can view the image properties. 123

  1. Once an image is part of a pdf it gets a physical "size" on the 'virtual paper'.
  2. The ppi (or dpi, but that is more for printing contexts) is a pdf metric that gives the ratio between physical size and number of pixels. I believe the unit pt/inch shown in the image is incorrect; it should be ppi. I also think calling it resolution is a poor word choice.
  3. The real image resolution (width hight) is a pdf-independent image property, it affects how large the file is and how much you can meaningfully zoom in when viewing digitally.

There is a simple mathematical relationship: 2 = 3 / 1 .

  • What you want to do is reduce 3 while keeping 1 constant, thereby implicitly reducing 2 by a corresponding amount.
  • Most editors use the wording "change dpi" which is effectively the same: change 2 and implicitly adjust 3 such that 1 remains the same size.
  • But under the hood the largest change occurs to the image resolution (3), the ppi/dpi is just a number that needs to be updated in the pdf; so I find my wording better:)

Below you can run a sort of 'smart-filter' on your pdf using Acrobat Pro, one of the available preset filters is reducing image dpi. So you can just run this preflight option or create your own. You can adjust downscaling options and image compression methods. Acrobat Pro

I think you can batch process multiple pdf files using this method in combination with the "action wizard" tool.

  • Well thought! But how do I divide the image and halve the dpi, specially in batch for all images (instead of doing manually for each one)? Is there perhaps any FOSS solution? Or even a solution in Acrobat? – flen Jul 26 '17 at 5:20
  • @flen I think imagemagick is often used for batch processing this kind of thing, but never used it myself. – jiggunjer Jul 26 '17 at 8:32
  • I think it wouldn't be much of a hassle to work with images in batches (I can export all images of all PDF pages using Acrobat). The problem would be to substitute them later on in the PDF itself. Maybe I can make Acrobat's JavaScript API substitute these images in batch... I'll have to look at it. But If I were to do it manually, how would you suggest me to create the low-res version and halve the dpi? Through using Imagemagick? – flen Jul 26 '17 at 22:04
  • @flen I updated with info on using Acrobat. – jiggunjer Jul 27 '17 at 4:20
  • Thank you!!! It worked perfectly! I ran the standard preflight "Downscale image resolution to 150 ppi (bitmaps to 300 ppi)" (in Acrobat DC Pro: under Tools -> Print Production -> Preflight -> PDF fixups). The PDF size was reduced to less than a third of the original size! Funny thing, I tried before to save an "optimized pdf" that would downscale to 150ppi images above this, but the size reduction was minimal. I don't know why the "preflight" and "optimized pdf" were so different – flen Jul 28 '17 at 8:02

Sejda's Compress PDF tool optimises the images in your PDF document, changing their DPI based on your selection.


Change DPI of images in PDF with Sejda compress PDF

There's also a desktop app available.

I'm one of the developers.

  • Nice! I just downloaded it, I'll give it a try – flen Jul 26 '17 at 5:20
  • My PDF is almost 100 Mb, this exceeds the 50 Mb limit for the free desktop version, so it's a no go... – flen Jul 26 '17 at 5:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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