Class SignatureOptions
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions
-
public class SignatureOptions extends java.lang.ObjectThis contains the visual signature as a COSDocument, its preferred size and the page.
-
-
Constructor Summary
Constructors Constructor Description SignatureOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the visual signature COSDocument, if any.intgetPage()Get the 1-based page number.intgetPreferedSignatureSize()Get the preferred size of the signature.COSDocumentgetVisualSignature()Get the visual signature.voidsetPage(int pageNo)Set the 1-based page number.voidsetPreferedSignatureSize(int size)Set the preferred size of the signature.voidsetVisualSignature(java.io.InputStream is)Reads the visual signature from the given input stream.voidsetVisualSignature(PDVisibleSigProperties visSignatureProperties)Reads the visual signature from the given visual signature properties
-
-
-
Method Detail
-
setPage
public void setPage(int pageNo)
Set the 1-based page number.- Parameters:
pageNo- the page number
-
getPage
public int getPage()
Get the 1-based page number.- Returns:
- the page number
-
setVisualSignature
public void setVisualSignature(java.io.InputStream is) throws java.io.IOExceptionReads the visual signature from the given input stream.- Parameters:
is- the input stream containing the visual signature- Throws:
java.io.IOException- when something went wrong during parsing
-
setVisualSignature
public void setVisualSignature(PDVisibleSigProperties visSignatureProperties) throws java.io.IOException
Reads the visual signature from the given visual signature properties- Parameters:
visSignatureProperties- thePDVisibleSigPropertiesobject containing the visual signature- Throws:
java.io.IOException- when something went wrong during parsing- Since:
- 1.8.3
-
getVisualSignature
public COSDocument getVisualSignature()
Get the visual signature.- Returns:
- the visual signature
-
getPreferedSignatureSize
public int getPreferedSignatureSize()
Get the preferred size of the signature.- Returns:
- the preferred size
-
setPreferedSignatureSize
public void setPreferedSignatureSize(int size)
Set the preferred size of the signature.- Parameters:
size- the size of the signature
-
close
public void close() throws java.io.IOExceptionCloses the visual signature COSDocument, if any.- Throws:
java.io.IOException- if the document could not be closed
-
-