Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adobe Acrobat Pro 11.0.20.17 displays the image incorrectly #131

Open
jul059 opened this issue Sep 16, 2019 · 8 comments
Open

Adobe Acrobat Pro 11.0.20.17 displays the image incorrectly #131

jul059 opened this issue Sep 16, 2019 · 8 comments
Assignees
Labels

Comments

@jul059
Copy link

jul059 commented Sep 16, 2019

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

@pts pts self-assigned this Feb 23, 2023
@pts pts added the bug label Feb 23, 2023
@pts
Copy link
Owner

pts commented Feb 23, 2023

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?

@jul059
Copy link
Author

jul059 commented Feb 23, 2023

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.

@pts
Copy link
Owner

pts commented Feb 23, 2023

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

@jul059
Copy link
Author

jul059 commented Feb 24, 2023

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

Adobe Acrobat Pro 11.0.20.17:
image

@pts
Copy link
Owner

pts commented Feb 24, 2023

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?

@jul059
Copy link
Author

jul059 commented Feb 25, 2023

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

@pts pts changed the title Image gets distorted Adobe Acrobat Pro 11.0.20.17 displays the image incorrectly. Mar 9, 2023
@pts pts changed the title Adobe Acrobat Pro 11.0.20.17 displays the image incorrectly. Adobe Acrobat Pro 11.0.20.17 displays the image incorrectly Mar 9, 2023
@pts
Copy link
Owner

pts commented Mar 9, 2023

Could you please upload the output PDFs you got in #131 (comment) ? 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.)

@jul059
Copy link
Author

jul059 commented Mar 10, 2023

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

They both display identical results (Comment 131).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants