Class AbstractPdfBoxSignatureDrawer
java.lang.Object
eu.europa.esig.dss.pdf.pdfbox.visible.AbstractPdfBoxSignatureDrawer
- All Implemented Interfaces:
PdfBoxSignatureDrawer
,SignatureDrawer
,SignatureFieldBoxBuilder
- Direct Known Subclasses:
DefaultPdfBoxVisibleSignatureDrawer
,NativePdfBoxVisibleSignatureDrawer
public abstract class AbstractPdfBoxSignatureDrawer extends Object implements PdfBoxSignatureDrawer, SignatureFieldBoxBuilder
The abstract implementation of PDFBox signature drawer
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.pdfbox.pdmodel.PDDocument
document
The PDF documentprotected SignatureImageParameters
parameters
Visual signature parametersprotected org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions
signatureOptions
Contains options of the visual signature -
Constructor Summary
Constructors Constructor Description AbstractPdfBoxSignatureDrawer()
-
Method Summary
Modifier and Type Method Description protected void
checkColorSpace(org.apache.pdfbox.pdmodel.PDDocument pdDocument, DSSDocument image)
Method to check if the target image's color space is present in the document's catalogprotected abstract String
getColorSpaceName(DSSDocument image)
Returns color space name for the provided imagevoid
init(SignatureImageParameters parameters, org.apache.pdfbox.pdmodel.PDDocument document, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions signatureOptions)
Initializes the drawerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.europa.esig.dss.pdf.visible.SignatureDrawer
draw
Methods inherited from interface eu.europa.esig.dss.pdf.visible.SignatureFieldBoxBuilder
buildSignatureFieldBox
-
Field Details
-
parameters
Visual signature parameters -
document
protected org.apache.pdfbox.pdmodel.PDDocument documentThe PDF document -
signatureOptions
protected org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions signatureOptionsContains options of the visual signature
-
-
Constructor Details
-
AbstractPdfBoxSignatureDrawer
public AbstractPdfBoxSignatureDrawer()
-
-
Method Details
-
init
public void init(SignatureImageParameters parameters, org.apache.pdfbox.pdmodel.PDDocument document, org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions signatureOptions) throws IOExceptionDescription copied from interface:PdfBoxSignatureDrawer
Initializes the drawer- Specified by:
init
in interfacePdfBoxSignatureDrawer
- Parameters:
parameters
-SignatureImageParameters
document
-PDDocument
signatureOptions
-SignatureOptions
- Throws:
IOException
- if an exception occurs
-
checkColorSpace
protected void checkColorSpace(org.apache.pdfbox.pdmodel.PDDocument pdDocument, DSSDocument image) throws IOExceptionMethod to check if the target image's color space is present in the document's catalog- Parameters:
pdDocument
-PDDocument
to check color profiles inimage
-DSSDocument
image- Throws:
IOException
- in case of image reading error
-
getColorSpaceName
Returns color space name for the provided image- Parameters:
image
-DSSDocument
to get color space name for- Returns:
String
color space name- Throws:
IOException
- in case of image reading error
-