public class PDFTransformationServiceImpl extends DefaultComponent implements PDFTransformationService
| Modifier and Type | Field and Description | 
|---|---|
protected static org.apache.commons.logging.Log | 
log  | 
protected static String | 
MIME_TYPE  | 
lastModified, name| Constructor and Description | 
|---|
PDFTransformationServiceImpl()  | 
| Modifier and Type | Method and Description | 
|---|---|
Blob | 
applyImageWatermark(Blob input,
                   Blob watermark,
                   WatermarkProperties properties)
Add an Image watermark to the input PDF blob 
 | 
Blob | 
applyTextWatermark(Blob input,
                  String text,
                  WatermarkProperties properties)
Add a text watermark to the input PDF blob 
 | 
Point2D | 
computeTranslationVector(double pageWidth,
                        double watermarkWidth,
                        double pageHeight,
                        double watermarkHeight,
                        WatermarkProperties properties)  | 
WatermarkProperties | 
getDefaultProperties()  | 
Blob | 
overlayPDF(Blob input,
          Blob overlayBlob)
Overlay a PDF file on top of the input Blob 
 | 
protected Blob | 
saveInTempFile(org.apache.pdfbox.pdmodel.PDDocument PdfDoc)  | 
activate, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderprotected static final org.apache.commons.logging.Log log
protected static final String MIME_TYPE
public PDFTransformationServiceImpl()
public WatermarkProperties getDefaultProperties()
getDefaultProperties in interface PDFTransformationServicepublic Blob applyTextWatermark(Blob input, String text, WatermarkProperties properties)
PDFTransformationServiceapplyTextWatermark in interface PDFTransformationServiceinput - A PDF blobtext - The text to use for the watermarkproperties - the properties of the watermarkpublic Blob applyImageWatermark(Blob input, Blob watermark, WatermarkProperties properties)
PDFTransformationServiceapplyImageWatermark in interface PDFTransformationServiceinput - A PDF blobwatermark - The image to use for the watermarkproperties - the properties of the watermarkpublic Blob overlayPDF(Blob input, Blob overlayBlob)
PDFTransformationServiceoverlayPDF in interface PDFTransformationServiceinput - The original PDF fileoverlayBlob - The PDF file to overlay on top inBlobpublic Point2D computeTranslationVector(double pageWidth, double watermarkWidth, double pageHeight, double watermarkHeight, WatermarkProperties properties)
protected Blob saveInTempFile(org.apache.pdfbox.pdmodel.PDDocument PdfDoc) throws IOException, org.apache.pdfbox.exceptions.COSVisitorException
IOExceptionorg.apache.pdfbox.exceptions.COSVisitorExceptionCopyright © 2019 Nuxeo. All rights reserved.