public class PDFMergerExample extends Object
PDFMergerUtility.setDestinationDocumentInformation(org.apache.pdfbox.pdmodel.PDDocumentInformation) and PDFMergerUtility.setDestinationMetadata(org.apache.pdfbox.pdmodel.common.PDMetadata) that were added in April 2016. These allow to control the meta data in a merge without having
to reopen the result file.| Constructor and Description |
|---|
PDFMergerExample() |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
merge(List<InputStream> sources)
Creates a compound PDF document from a list of input documents.
|
public InputStream merge(List<InputStream> sources) throws IOException
The merged document is PDF/A-1b compliant, provided the source documents are as well. It contains document properties title, creator and subject, currently hard-coded.
sources - list of source PDF document streams.IOException - if anything goes wrong during PDF merge.Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.