Annotations with transparency not rendered correctly
Describe the bug Annotations that contains transparency, i.e. PDAnnotationMarkup with constantOpacity != 1 are not rendered correctly.
To reproduce Add the linked PDF below to the assets-folder of the sample-app in the repository and modify the renderFile-method in MainActivity to open and display the file:
PDDocument document = PDDocument.load(assetManager.open("annotations_opacity_bug.pdf"));
PDF example PDF-document demonstrating the issue
This PDF has been created using PdfBox-Android, so it's not an issue with annotation creation, but with rendering. The same issue is observed with any other PDF containing annotations with transparency.
Expected behavior PDF rendered with a solid red line and a semi-transparent yellow-line. Open the linked PDF in Preview on macOS, or any other PDF-viewer, and it should show that the yellow annotation is actually semi-transparent.
Actual behavior The document is rendered with solid yellow line, while it should be semi-transparent.
Environment details:
- PdfBox-Android version: 2.0.20.0
- Android API version: API 31
Additional context Happy to help you debug the problem. Just let me know 👍
I have the same issue here. v.2.0.26 Can you please fix ? Thanks in advance