Class SignatureOptions
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.interactive.digitalsignature.SignatureOptions
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class SignatureOptions extends Object implements Closeable
TODO description needed
-
-
Constructor Summary
Constructors Constructor Description SignatureOptions()Creates the default signature options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the visual signature COSDocument, if any.intgetPage()Get the page number.intgetPreferedSignatureSize()Get the preferred size of the signature.COSDocumentgetVisualSignature()Get the visual signature.voidsetPage(int pageNo)Set the page number.voidsetPreferedSignatureSize(int size)Set the preferred size of the signature.voidsetVisualSignature(PDVisibleSigProperties visSignatureProperties)Reads the visual signature from the given visual signature propertiesvoidsetVisualSignature(File file)Reads the visual signature from the given file.voidsetVisualSignature(InputStream is)Reads the visual signature from the given input stream.
-
-
-
Method Detail
-
setPage
public void setPage(int pageNo)
Set the page number.- Parameters:
pageNo- the page number
-
getPage
public int getPage()
Get the page number.- Returns:
- the page number
-
setVisualSignature
public void setVisualSignature(File file) throws IOException
Reads the visual signature from the given file.- Parameters:
file- the file containing the visual signature- Throws:
IOException- when something went wrong during parsing
-
setVisualSignature
public void setVisualSignature(InputStream is) throws IOException
Reads the visual signature from the given input stream.- Parameters:
is- the input stream containing the visual signature- Throws:
IOException- when something went wrong during parsing
-
setVisualSignature
public void setVisualSignature(PDVisibleSigProperties visSignatureProperties) throws IOException
Reads the visual signature from the given visual signature properties- Parameters:
visSignatureProperties- thePDVisibleSigPropertiesobject containing the visual signature- Throws:
IOException- when something went wrong during parsing
-
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 IOExceptionCloses the visual signature COSDocument, if any.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- if the document could not be closed
-
-