1

I have a PDF where each page is a full-colored image (it's an artbook). There are 16 pages. One page is completely blank.

The PDF itself is 140 MB. When I extract each image to BMP, the images only take up 30 MB. Lossless compression to PNG yielded 13 MB.

How is it possible that the PDF is 140 MB when the images themselves is (is arguably at worst) 30 MB? Are PDF's using an extremely inefficient way to store image data where each pixel takes up more than 4 bytes?

I like PDF because a lot of applications support it without having to install additional software/plugins, but this I found this quite strange.

I'm not sure if this particular PDF is just a special case.

0

what software are you using to "extract" images from pdf?

take in mind that to extract images from pdf at their native resolution you need to use

pdfimages

here you can download binaries for Microsoft Windows and Linux

usage:

pdfimages [options] <PDF-file> <image-root>

once you extract images at their full res, you can rightly evaluate the issue you think to have

for colorful images, generally, pdf have only one efficient compression way to keep quality and decrease filesize

the jpeg-2000

so, you need to re-encode the images extracted from pdf with pdfimages with a software able to convert to jpeg-2000 like:

  • imagemagick
  • graphicsmagick
  • many others

then, you need to put these jpeg-2000 encoded images into a pdf, without re-encoding. This can be done both in Microsoft Windows and in Linux (with Wine) with:

freepic2pdf

  • I am using irfanview which uses ghostscript for the processing. I have not tried creating PDF's myself, but might give is a try to see how my output comes out compared to how the author did it (the PDF is not mine) – That Umbrella Guy Jan 19 '14 at 19:22

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.