public class PDFMerge extends Object
 Basically, the caller adds blobs and then merge(). The PDFs are merged in the order they were added.
 
 The class accepts misc parameters: Single Blob, BlobList, single
 DocumentModel, DocumentModelList or a list of IDs of DocumentModel
 
 Notice: These are nuxeo Blob, BlobList, etc.
 
 When a DocumentModel is used, the code may expect an xpath to extract the blob from the document. When
 the xpath parameter is not used (null or ""), the default file:content xpath is used.
 
To let the caller be generic, it's ok to pass a null blob, so it is just ignored.
| Constructor and Description | 
|---|
PDFMerge()  | 
PDFMerge(Blob inBlob)  | 
PDFMerge(BlobList inBlobs)  | 
PDFMerge(DocumentModelList inDocs,
        String inXPath)  | 
PDFMerge(DocumentModel inDoc,
        String inXPath)  | 
PDFMerge(String[] inDocIDs,
        String inXPath,
        CoreSession inSession)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addBlob(Blob inBlob)  | 
void | 
addBlob(DocumentModel inDoc,
       String inXPath)  | 
void | 
addBlobs(BlobList inBlobs)  | 
void | 
addBlobs(DocumentModelList inDocs,
        String inXPath)  | 
void | 
addBlobs(String[] inDocIDs,
        String inXPath,
        CoreSession inSession)  | 
Blob | 
merge(String inFileName)
Merge the PDFs. 
 | 
Blob | 
merge(String inFileName,
     String inTitle,
     String inSubject,
     String inAuthor)
Merge the PDFs. 
 | 
public PDFMerge()
public PDFMerge(DocumentModel inDoc, String inXPath)
public PDFMerge(DocumentModelList inDocs, String inXPath)
public PDFMerge(String[] inDocIDs, String inXPath, CoreSession inSession)
public void addBlob(DocumentModel inDoc, String inXPath)
public void addBlobs(DocumentModelList inDocs, String inXPath)
public void addBlobs(String[] inDocIDs, String inXPath, CoreSession inSession)
public Blob merge(String inFileName) throws org.apache.pdfbox.exceptions.COSVisitorException, IOException
inFileName - Name of the merged result.org.apache.pdfbox.exceptions.COSVisitorExceptionIOExceptionpublic Blob merge(String inFileName, String inTitle, String inSubject, String inAuthor) throws IOException, org.apache.pdfbox.exceptions.COSVisitorException
Notice for title, author and subject: If the value is null or "", it is just ignored.
inFileName - Name of the merged result.inTitle - Title of the resulting PDF.inSubject - Subject of the resulting PDF.inAuthor - Author of the resulting PDF.IOExceptionorg.apache.pdfbox.exceptions.COSVisitorExceptionCopyright © 2019 Nuxeo. All rights reserved.