-
Notifications
You must be signed in to change notification settings - Fork 681
-
Is it possible to create portfolios ("a package of other PDFs files") using OpenPDF?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
All reactions
-
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(portfolioFile));
document.open();
PdfCopy copy = new PdfCopy(document, new FileOutputStream(portfolioFile));
This is something one should never do, creating both a PdfWriter and a PdfCopy writing to the same output file concurrently.
According to chatgbp.
Ah, that explains the error.
Beta Was this translation helpful? Give feedback.
All reactions
-
Hhmmm, I assume what the OP meant actually is a portable collection (see ISO 32000-2 section 12.3.5 Collections), not a simple merge. In Acrobat these collections are called portfolios (see Acrobat Combine tool, Options, "Save as PDF Portfolio").
These portable collections contain other files as attachments and also have some extra data from which a PDF viewer can build an interface to access those attachments.
Beta Was this translation helpful? Give feedback.
All reactions
-
See the collection package:
https://github.com/LibrePDF/OpenPDF/tree/b6f81c1d4c8d19010184788219e24a3c34565079/openpdf/src/main/java/com/lowagie/text/pdf/collection
Beta Was this translation helpful? Give feedback.