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 OperationContextctxprotected Stringfilenamestatic StringIDprotected StringxpathBlobToAppend
-
Constructor Summary
Constructors Constructor Description ConcatenatePDFs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BlobappendPDFs(org.apache.pdfbox.multipdf.PDFMergerUtility ut)protected voidcheckPdf(Blob blob)Check if blob is a pdf.protected voidhandleBlobToAppend(org.apache.pdfbox.multipdf.PDFMergerUtility ut)Check if blob to append is a PDF blob.Blobrun(BlobList blobs)Blobrun(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:
OperationExceptionIOException
-
run
public Blob run(BlobList blobs) throws IOException, OperationException
- Throws:
IOExceptionOperationException
-
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, OperationExceptionCheck if blob to append is a PDF blob.- Throws:
IOExceptionOperationException
-
checkPdf
protected void checkPdf(Blob blob) throws OperationException
Check if blob is a pdf.- Throws:
OperationException
-
-