pdfsizeopt icon indicating copy to clipboard operation
pdfsizeopt copied to clipboard

Adobe Acrobat Pro 11.0.20.17 displays the image incorrectly

Open jul059 opened this issue 6 years ago • 8 comments

pdfsizeopt on windows completely distorts the image in the sample pdf. It happens at least with the following commands:

--use-image-optimizer=ECT,jbig2 --use-image-optimizer=pngout,jbig2 no commands

sample.pdf sample optimized.pdf

EDIT: after opening the files in my browser, I realize this happens with Adobe Acrobat Pro 11.0.20.17 but not with Chrome or Firefox. Acrobat being a more complete program developed by the inventors of the pdf format, I think this is still a valid issue. Here's what it looks like:

image

jul059 avatar Sep 16 '19 22:09 jul059

The optimized PDF file works for me in Chrome, Firefox, Evince and Ghostscript.

It looks like Adobe Acrobat has a bug rendering the /SMask image. Maybe the bug is related to /Filter/JBIG2Decode.

  1. Does pdfsizeopt --use-jbig2=no fix it for Adobe Acrobat?

  2. Have you tried reporting the bug to Adobe?

pts avatar Feb 23 '23 03:02 pts

The output is still distorted.

I have not reported it to Adobe. It may also have been fixed in a later version of Adobe Acrobat Pro, 11.0.20.17 is quite old. I don't have access to a newer version.

jul059 avatar Feb 23 '23 03:02 jul059

Could you please send me a screenshot of this? sample.nosmask.pdf

pts avatar Feb 23 '23 04:02 pts

Could you please send me a screenshot of this? sample.nosmask.pdf

Adobe Acrobat Pro 11.0.20.17: image

jul059 avatar Feb 24 '23 03:02 jul059

Adobe Acrobat Pro 11.0.20.17: image

Thank you, this is exactly how it looks for me in other viewers (e.g. Chrome).

It looks like that Adobe Acrobat Pro 11.0.20.17 has problems rendering the /SMask image, even if it's not JBig2-encoded.

Could you please upload the output PDF with pdfsizeopt --use-jbig2=no and a screenshot of Adobe Acrobat Pro 11.0.20.17 displaying it?

pts avatar Feb 24 '23 15:02 pts

With the 2017 binary of pdfsizeopt, it looks exaclty like the screenshot in the first post.

With the latest binary (v7), I get an error and no image is displayed: image

jul059 avatar Feb 25 '23 21:02 jul059

Could you please upload the output PDFs you got in https://github.com/pts/pdfsizeopt/issues/131#issuecomment-1445206889 ? It's very interesting that that the output of two versions of pdfsizeopt behave differently in Adobe Acrobat Pro.

I have a suspicion on what can cause the problem. I'll give it a try after I get the PDFs. (My suspicion is that for Adobe Acrobat Pro to work, the /BitsPerComponent of the /SMask image must be either 8, or the same as /BitsPerComponent of the source image.)

pts avatar Mar 09 '23 05:03 pts

sample.pso.v7.pdf sample.pso.v8.pdf

They both display identical results (Comment 131).

jul059 avatar Mar 10 '23 16:03 jul059