Class PDFMergeDocumentsOperation
- java.lang.Object
 - 
- org.nuxeo.ecm.platform.pdf.operations.PDFMergeDocumentsOperation
 
 
- 
public class PDFMergeDocumentsOperation extends Object
The input document(s) always is(are) the first PDF(s), and each pdf is read in thexpathfield. Ifxpathis not set, it is set to the default valuefile:content.The operation appends:
- First, The blob referenced in the 
toAppendVarNameContext variable. - Then, it appends all the blobs stored in the 
toAppendListVarNameContext variable. - And last, it appends the blobs stored in the docs whose IDs are passed in 
toAppendDocIDsVarName, using thexpathparameter. 
All variable names are optional: You can pass only
toAppendVarName, ortoAppendVarNameandtoAppendDocIDsVarName, or ...Returns the final PDF.
- Since:
 - 8.10
 
 - First, The blob referenced in the 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected OperationContextctxprotected StringfileNamestatic StringIDprotected StringpdfAuthorprotected StringpdfSubjectprotected StringpdfTitleprotected CoreSessionsessionprotected StringtoAppendDocIDsVarNameprotected StringtoAppendListVarNameprotected StringtoAppendVarNameprotected Stringxpath 
- 
Constructor Summary
Constructors Constructor Description PDFMergeDocumentsOperation() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BlobdoMerge(PDFMerge inMergeTool)Blobrun(DocumentModel inDoc)Blobrun(DocumentModelList inDocs) 
 - 
 
- 
- 
Field Detail
- 
ID
public static final String ID
- See Also:
 - Constant Field Values
 
 
- 
session
protected CoreSession session
 
- 
ctx
protected OperationContext ctx
 
- 
xpath
protected String xpath
 
- 
toAppendVarName
protected String toAppendVarName
 
- 
toAppendListVarName
protected String toAppendListVarName
 
- 
toAppendDocIDsVarName
protected String toAppendDocIDsVarName
 
- 
fileName
protected String fileName
 
- 
pdfTitle
protected String pdfTitle
 
- 
pdfSubject
protected String pdfSubject
 
- 
pdfAuthor
protected String pdfAuthor
 
 - 
 
- 
Method Detail
- 
run
public Blob run(DocumentModel inDoc) throws NuxeoException
- Throws:
 NuxeoException
 
- 
run
public Blob run(DocumentModelList inDocs) throws NuxeoException
- Throws:
 NuxeoException
 
- 
doMerge
protected Blob doMerge(PDFMerge inMergeTool) throws NuxeoException
- Throws:
 NuxeoException
 
 - 
 
 -