Class SignatureOptions
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions
-
public class SignatureOptions extends java.lang.Object
This 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 void
close()
Closes the visual signature COSDocument, if any.int
getPage()
Get the 1-based page number.int
getPreferedSignatureSize()
Get the preferred size of the signature.COSDocument
getVisualSignature()
Get the visual signature.void
setPage(int pageNo)
Set the 1-based page number.void
setPreferedSignatureSize(int size)
Set the preferred size of the signature.void
setVisualSignature(java.io.InputStream is)
Reads the visual signature from the given input stream.void
setVisualSignature(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.IOException
Reads 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
- thePDVisibleSigProperties
object 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.IOException
Closes the visual signature COSDocument, if any.- Throws:
java.io.IOException
- if the document could not be closed
-
-