Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.24
-
None
Description
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:
Ideally, our flow should extract its graphical content as an individual image:
But after the TGs is decoded, the results we obtain with our current implementation are the following 3 separate images:
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.
Attachments
Attachments
Issue Links
- is related to
-
PDFBOX-5454 Add a setter for `PageDrawer.graphics` member variable
- Closed