Class ConcatenatePDFs
- java.lang.Object
-
- org.nuxeo.ecm.automation.core.operations.blob.ConcatenatePDFs
-
public class ConcatenatePDFs extends Object
Given a File document holding a pdf on the file:content property and 2 pdfs on the files:files property, the following operation will provide a pdf that is the result of the merge of all the pdfs, with the content of the one in file:content property first.- Since:
- 5.8
-
-
Field Summary
Fields Modifier and Type Field Description protected OperationContext
ctx
protected String
filename
static String
ID
protected String
xpathBlobToAppend
-
Constructor Summary
Constructors Constructor Description ConcatenatePDFs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Blob
appendPDFs(org.apache.pdfbox.multipdf.PDFMergerUtility ut)
protected void
checkPdf(Blob blob)
Check if blob is a pdf.protected void
handleBlobToAppend(org.apache.pdfbox.multipdf.PDFMergerUtility ut)
Check if blob to append is a PDF blob.Blob
run(BlobList blobs)
Blob
run(Blob blob)
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
ctx
protected OperationContext ctx
-
xpathBlobToAppend
protected String xpathBlobToAppend
-
filename
protected String filename
-
-
Method Detail
-
run
public Blob run(Blob blob) throws OperationException, IOException
- Throws:
OperationException
IOException
-
run
public Blob run(BlobList blobs) throws IOException, OperationException
- Throws:
IOException
OperationException
-
appendPDFs
protected Blob appendPDFs(org.apache.pdfbox.multipdf.PDFMergerUtility ut) throws IOException
- Throws:
IOException
-
handleBlobToAppend
protected void handleBlobToAppend(org.apache.pdfbox.multipdf.PDFMergerUtility ut) throws IOException, OperationException
Check if blob to append is a PDF blob.- Throws:
IOException
OperationException
-
checkPdf
protected void checkPdf(Blob blob) throws OperationException
Check if blob is a pdf.- Throws:
OperationException
-
-