You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Daniel Persson (Jira)" <ji...@apache.org> on 2026/06/22 08:56:00 UTC

[jira] [Commented] (PDFBOX-6024) Incorrect rendering of complex masks

    [ https://issues.apache.org/jira/browse/PDFBOX-6024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090544#comment-18090544 ] 

Daniel Persson commented on PDFBOX-6024:
----------------------------------------

Hi Team.

 

This PR is now more than a year old, so I thought I would try a new approach. I gave my AI agent a task to look at this on the back burner. After weeks of attempts, discussions, and testing, it finally found the reason. In this particular PDF we have a SoftMask that has a different size than the image we want to render. 

Currently, Poppler and PDFBox aren't handling this. The agent suggested a mapping between the two image spaces, and that patch is now included in this PR. I've run this against my test suite of 50k+ pages and did not find any regression. 

 

Hope this improvement or something similar is acceptable.

Best regards

Daniel

> Incorrect rendering of complex masks
> ------------------------------------
>
>                 Key: PDFBOX-6024
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-6024
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 3.0.5 PDFBox
>            Reporter: Daniel Persson
>            Priority: Major
>         Attachments: DN-A4-20250604-A-06-Nyheter.pdf, adobe.png, p1_proportional_mapping.patch, pdfbox.jpg, poppler-1.png
>
>
> Hi
> This PDF seems to render incorrectly. I can view it in Adobe and Chrome correctly but neither Poppler or PDFBox render it correctly.
> The masking of the left image is strange so it adds and extra orange border.
> I've looked into the PDF a bit and it seems to be multiple masks in ExtGState then rendered with an rect inside of a Form. So solving this is probably not easy.
> Best regards
> Daniel



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org