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, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
protected static final org.apache.commons.logging.Log log
protected static final String MIME_TYPE
public PDFTransformationServiceImpl()
public WatermarkProperties getDefaultProperties()
getDefaultProperties
in interface PDFTransformationService
public Blob applyTextWatermark(Blob input, String text, WatermarkProperties properties)
PDFTransformationService
applyTextWatermark
in interface PDFTransformationService
input
- A PDF blobtext
- The text to use for the watermarkproperties
- the properties of the watermarkpublic Blob applyImageWatermark(Blob input, Blob watermark, WatermarkProperties properties)
PDFTransformationService
applyImageWatermark
in interface PDFTransformationService
input
- A PDF blobwatermark
- The image to use for the watermarkproperties
- the properties of the watermarkpublic Blob overlayPDF(Blob input, Blob overlayBlob)
PDFTransformationService
overlayPDF
in interface PDFTransformationService
input
- 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
IOException
org.apache.pdfbox.exceptions.COSVisitorException
Copyright © 2019 Nuxeo. All rights reserved.