[ 
https://issues.apache.org/jira/browse/PDFBOX-5314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr resolved PDFBOX-5314.
-------------------------------------
      Assignee: Tilman Hausherr
    Resolution: Fixed

> Additional `showTransparencyGroupOnGraphics()` method
> -----------------------------------------------------
>
>                 Key: PDFBOX-5314
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5314
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: Rendering
>    Affects Versions: 2.0.24
>            Reporter: Henry Iguaro
>            Assignee: Tilman Hausherr
>            Priority: Minor
>             Fix For: 2.0.25, 3.0.0 PDFBox
>
>         Attachments: image-2021-11-05-14-36-13-097.png
>
>
> Hey team,
> In one particular feature of our product, we read PDF files (using PDFBox, of 
> course) and extract graphical elements as individual images for our 
> customers. However, when TGs are decoded, we end up with partial results. For 
> example, given the following 
> [file|https://github.com/apache/pdfbox/files/7457707/testing.pdf]:
> !https://user-images.githubusercontent.com/2560573/139784518-b3f8965c-79a2-45d6-8200-62fa0e3c4459.png!
> Ideally, our flow should extract its graphical content as an individual image:
> !https://user-images.githubusercontent.com/2560573/139784739-d7562053-0f11-4752-be7f-2ba6659d4816.png!
> But after the TGs is decoded, the results we obtain with our current 
> implementation are the following 3 separate images:
> !image-2021-11-05-14-36-13-097.png!
> We found out that if we manage to pass a particular {{Graphics2D}} instance 
> to {{showTransparencyGroup()}} we can redirect the rendering of the TG to a 
> separate image and achieve our feature.
> We created a PR as a potential proposal for a new protected 
> {{showTransparencyGroupOnGraphics()}} method that would extend the current 
> {{showTransparencyGroup()}} by taking an additional {{Graphics2D}} argument. 
> The link to the PR is here:
> https://github.com/apache/pdfbox/pull/134
> The above is just a suggestion but keen to hear your thoughts, and of course, 
> open to better ideas.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to