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 thexpath
field. Ifxpath
is not set, it is set to the default valuefile:content
.The operation appends:
- First, The blob referenced in the
toAppendVarName
Context variable. - Then, it appends all the blobs stored in the
toAppendListVarName
Context variable. - And last, it appends the blobs stored in the docs whose IDs are passed in
toAppendDocIDsVarName
, using thexpath
parameter.
All variable names are optional: You can pass only
toAppendVarName
, ortoAppendVarName
andtoAppendDocIDsVarName
, or ...Returns the final PDF.
- Since:
- 8.10
- First, The blob referenced in the
-
-
Field Summary
Fields Modifier and Type Field Description protected OperationContext
ctx
protected String
fileName
static String
ID
protected String
pdfAuthor
protected String
pdfSubject
protected String
pdfTitle
protected CoreSession
session
protected String
toAppendDocIDsVarName
protected String
toAppendListVarName
protected String
toAppendVarName
protected String
xpath
-
Constructor Summary
Constructors Constructor Description PDFMergeDocumentsOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Blob
doMerge(PDFMerge inMergeTool)
Blob
run(DocumentModel inDoc)
Blob
run(DocumentModelList inDocs)
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
session
protected CoreSession session
-
ctx
protected OperationContext ctx
-
toAppendVarName
protected String toAppendVarName
-
toAppendListVarName
protected String toAppendListVarName
-
toAppendDocIDsVarName
protected String toAppendDocIDsVarName
-
pdfSubject
protected String pdfSubject
-
-
Constructor Detail
-
PDFMergeDocumentsOperation
public PDFMergeDocumentsOperation()
-
-
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
-
-