LibrePDF / OpenPDF

OpenPDF is a free Java library for creating and editing PDF files, with a LGPL and MPL open source license. OpenPDF is based on a fork of iText. We welcome contributions from other developers. Please feel free to submit pull-requests and bugreports to this GitHub repository.
Other
3.63k stars 598 forks source link

PdfCopy cannot be used for writing #1165

Closed rasmusfaber closed 3 months ago

rasmusfaber commented 6 months ago

Is your feature request related to a problem? Please describe. com.lowagie.text.pdf.PdfCopy extends PdfWriter, but it cannot actually be used for writing to a document. It just silently ignores calls that tries to add new pages.

Describe the solution you'd like PdfCopy should just add new pages if requested.

Describe alternatives you've considered An alternative is to generate a temporary PDF file with the required new pages and then copy those into the new document with PdfCopy, but that is a bit wasteful.

Your real name Rasmus Faber-Espensen

Additional context PR will follow shortly.

asturio commented 6 months ago

The PR is in the queue. I'll merge it soon, if there is no resistance.