Color key masking of images in PDFs doesn’t work well in latest versions of Reader for Android
Hello,
we faced a problem with Adobe Reader on Android devices, starting with the version 17.5, and also existing in the current version 18.2:
A red rectangle appears, and covers the objects behind it.
Steps to reproduce the issue: open the attached PDF file with Acrobat Reader Android. Reader Version: 17.5, 18.2
Expected result: A user graphic with beams and bars is show in the bottom part of the PDF (compare by opening the same PDF on Windows or with other PDF reader on android)
Observed result: This user graphic is covered by a red rectangle.
A deeper investigation revealed that the reason is based in the masking of colors in an image object, which seems to be broken.
In PDFs, which we are generating since years using JasperReports/IText Framework, there in an image with color mask:
5 0 obj
/Mask [8 8 ]/Subtype/Image/Height 1/Filter/FlateDecode/Type/XObject/Width 1/Length 9/BitsPerComponent 8>>stream
(byte stream here>)
endstream
endobj
Displaying the same PDFs with other PDF Reader tools (Google Reader, Foxit, etc) and with Adobe Reader on Windows and iOS with newest versions works without problems.
We observed, that setting the mask value e.g. to /Mask [0 7] let the masked color appear in Adobe Reader on Windows also,
so we believe the reason for the problem on Android is the wrong interpretation of the mask value.
Furthermore, the image itself is part of a Transparency Group Xobject, may be this is a reason for the failed masking?
Attached you will find a PDF file which contains the objects like described above.
When opening with Adobe Reader fpr Android a red rectangle appears on top of the image with user data.
We are grateful for any help.
Best regards
Christof