Open jul059 opened 4 years ago
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
.
Does pdfsizeopt --use-jbig2=no
fix it for Adobe Acrobat?
Have you tried reporting the bug to Adobe?
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.
Could you please send me a screenshot of this? sample.nosmask.pdf
Could you please send me a screenshot of this? sample.nosmask.pdf
Adobe Acrobat Pro 11.0.20.17:
Adobe Acrobat Pro 11.0.20.17:
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?
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:
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.)
sample.pso.v7.pdf sample.pso.v8.pdf
They both display identical results (Comment 131).
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: