[ https://issues.apache.org/jira/browse/PDFBOX-2355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137649#comment-14137649 ]
John Hewson commented on PDFBOX-2355: ------------------------------------- The Splitter class has not had any attention for a while. Clearly you're the first person to try to use the subclassing functionality it provides, and it isn't actually possible. I've refactored the internals of Splitter and reduced its protected API to to just 5 methods. The createNewDocument() method can now simply call getSourceDocument() to access the source document, and can now return a PDDocument instance which will be added to "newDocuments" (now "destinationDocuments") internally. As nobody else has tried using the API in this manner, please let me know how well it works for you - we can incorporate any useful changes needed. > newDocuments is private in Splitter > ----------------------------------- > > Key: PDFBOX-2355 > URL: https://issues.apache.org/jira/browse/PDFBOX-2355 > Project: PDFBox > Issue Type: Bug > Components: Utilities > Affects Versions: 1.8.6 > Environment: Ubuntu 14.04, Java 8_20 > Reporter: G. Ralph Kuntz > Priority: Critical > Labels: pdfbox > Fix For: 2.0.0 > > > The method `createNewDocument` in `Splitter` is protected, so it can be > overridden, but one of the things it needs to do with the new document is add > it to the `newDocuments` list, which is private. -- This message was sent by Atlassian JIRA (v6.3.4#6332)