Hi, currently there are several areas in pdfbox where pages are imported from pdfs and reused to form new content e.g. Overlay, OverlayPDF, PDFMerger, PDFSplit. Some of these do have their own ways to handle the actual import some do reuse utility classes. For overlay purposes we need an imported page as xObject for splitting that's not necessary.
As I do not have a complete overview about the lib would it make sense to come up with something like a PageManager to handle these tasks e.g. PageManager.importPage(PDPage page), PageManager.importPage(PDDocument pdDocument, int pageNumber) … or is that not needed? Is a call to PDage page.getContents() reliable to get the content stream or does it have to be done by iterating and copying the individual parts as has be done in OverlayPDF? Could that be enhanced? Shall we handle page imports always as xObjects? Thanks for your feedback on these open questions. Maruan Sahyoun