[ https://issues.apache.org/jira/browse/PDFBOX-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16683011#comment-16683011 ]
Wiktor Kwapisiewicz commented on PDFBOX-4375: --------------------------------------------- {quote}Did you have any troubles without that line or did you make that change because it looked as it had been forgotten? {quote} Yep, mainly that, I didn't think about manually closing the document and without that line I got a lot of unclosed document warnings. Also you used {{specificPageOverlayPage}} but then placed {{doc}} instead of {{getLayoutPage(doc)}} so I thought that was a minor issue. Now it works with only this line: {code:java} specificPageOverlayPage.put(e.getKey(), getLayoutPage(doc)); {code} Of course I'm closing PDDocuments in the client of the {{overlay}} method but that's not a problem. I see you did some extra modifications, I've checked the top revision and it looks fine. Thanks a lot for taking the time to work with me on this issue, I really appreciate it! Kind regards, Wiktor > Change visibility of Overlay#loadPDF to protected > ------------------------------------------------- > > Key: PDFBOX-4375 > URL: https://issues.apache.org/jira/browse/PDFBOX-4375 > Project: PDFBox > Issue Type: Improvement > Components: Utilities > Affects Versions: 2.0.12 > Reporter: Wiktor Kwapisiewicz > Assignee: Tilman Hausherr > Priority: Minor > Labels: Overlay > Fix For: 2.0.13, 3.0.0 PDFBox > > Attachments: > 0001-Change-visibility-of-Overlay-loadPDF-to-protected.patch > > > Overriding loadPDF allows subclasses to load overlays from sources different > than File objects, for example from InputStreams or byte arrays (mostly > through PDDocument.load overloads). > For example: > {code:java} > Overlay overlay = new Overlay() { > @Override > protected PDDocument loadPDF(String pdfName) throws IOException { > return PDDocument.load(overlayStreams.get(pdfName)); > } > }; > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org