public class SignatureHandler<T> extends Object
Create instance of SignatureHandler class to sign documents with image and digital signatures
Constructor and Description |
---|
SignatureHandler()
Instantiate the SignatureHandler with default
SignatureConfig , IInputDataHandler and IOutputDataHandler
All files will be loaded from local file system |
SignatureHandler(SignatureConfig signatureConfig)
Instantiate the SignatureHandler with default
IInputDataHandler and IOutputDataHandler
All files will be loaded from local file system |
SignatureHandler(SignatureConfig signatureConfig,
com.groupdocs.signature.domain.interfaces.IFileNameCompositor fileNameCompositor) |
SignatureHandler(SignatureConfig signatureConfig,
IInputDataHandler inputDataHandler)
Instantiate the SignatureHandler with default
IOutputDataHandler and custom IInputDataHandler implementation |
SignatureHandler(SignatureConfig signatureConfig,
IInputDataHandler inputDataHandler,
IOutputDataHandler outputDataHandler)
Instantiate the SignatureHandler with custom
IInputDataHandler and IOutputDataHandler implementation |
SignatureHandler(SignatureConfig signatureConfig,
IOutputDataHandler outputDataHandler)
Instantiate the SignatureHandler with default
IInputDataHandler and custom IOutputDataHandler implementation |
Modifier and Type | Method and Description |
---|---|
DocumentDescription |
getDocumentDescription(InputStream stream,
String password)
Gets information about document pages: their sizes,
maximum page height, the width of a page with the maximum height.
|
DocumentDescription |
getDocumentDescription(String guid,
String password)
Gets information about document pages: their sizes,
maximum page height, the width of a page with the maximum height.
|
static byte[] |
getDocumentPageImage(String guid,
Integer width,
Integer quality,
int pageIndex)
Deprecated.
|
Dimension |
getDocumentPageSize(InputStream stream,
int pageNumber,
String password,
double signatureLocationXforCells,
double signatureLocationYforCells,
PositionInCellsDocument positionInCellsDocument)
Gets the size of a page of a document.
|
Dimension |
getDocumentPageSize(String guid,
int pageNumber,
String password,
double signatureLocationXforCells,
double signatureLocationYforCells,
PositionInCellsDocument positionInCellsDocument)
Gets the size of a page of a document.
|
static DocumentDescription |
getPageDescriptions(String guid)
Deprecated.
|
byte[] |
getPageImage(InputStream stream,
int pageNumber,
String password,
Integer width,
Integer quality)
Returns an image of a specified page.
|
byte[] |
getPageImage(String guid,
int pageNumber,
String password,
Integer width,
Integer quality)
Returns an image of a specified page.
|
static Dimension |
getPageSize(String guid,
int signaturePageNumber,
double signatureLocationX,
double signatureLocationY,
PositionInCellsDocument positionInCellsDocument)
Deprecated.
|
SignatureConfig |
getSignatureConfig()
Signature Configuration with file location paths options
|
T |
sign(InputStream stream,
SignatureOptionsCollection collection)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(InputStream stream,
SignatureOptionsCollection collection,
LoadOptions loadOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(InputStream stream,
SignatureOptionsCollection collection,
LoadOptions loadOptions,
SaveOptions saveOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(InputStream stream,
SignatureOptionsCollection collection,
SaveOptions saveOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(InputStream stream,
SignOptions signOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(InputStream stream,
SignOptions signOptions,
LoadOptions loadOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(InputStream stream,
SignOptions signOptions,
LoadOptions loadOptions,
SaveOptions saveOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(InputStream stream,
SignOptions signOptions,
SaveOptions saveOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(String guid,
SignatureOptionsCollection collection)
Sign the document from file quid with list of SignOptions
|
T |
sign(String guid,
SignatureOptionsCollection collection,
LoadOptions loadOptions)
Sign the document from file quid with List of Signature Options and Load Options
|
T |
sign(String guid,
SignatureOptionsCollection collection,
LoadOptions loadOptions,
SaveOptions saveOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(String guid,
SignatureOptionsCollection collection,
SaveOptions saveOptions)
Sign the document from file quid with Signature Options and Save options
|
T |
sign(String guid,
SignOptions signOptions)
Sign the document from file quid with SignOptions
|
T |
sign(String guid,
SignOptions signOptions,
LoadOptions loadOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(String guid,
SignOptions signOptions,
LoadOptions loadOptions,
SaveOptions saveOptions)
Sign the document from file quid with SignOptions, load and save options
|
T |
sign(String guid,
SignOptions signOptions,
SaveOptions saveOptions)
Sign the document from file quid with SignOptions, load and save options
|
VerificationResult |
verify(InputStream stream,
VerifyOptions verifyOptions)
Verify the document from stream with VerifyOptions
|
VerificationResult |
verify(InputStream stream,
VerifyOptionsCollection collection)
Verify the document from file quid with list of VerifyOptions
|
VerificationResult |
verify(InputStream stream,
VerifyOptionsCollection collection,
LoadOptions loadOptions)
Verify the document from file quid with list of VerifyOptions
|
VerificationResult |
verify(InputStream stream,
VerifyOptions verifyOptions,
LoadOptions loadOptions)
Verify the document from stream with VerifyOptions
|
VerificationResult |
verify(String guid,
VerifyOptions verifyOptions)
Verify the document from file guid with VerifyOptions
|
VerificationResult |
verify(String guid,
VerifyOptionsCollection collection)
Verify the document from file quid with list of VerifyOptions
|
VerificationResult |
verify(String guid,
VerifyOptionsCollection collection,
LoadOptions loadOptions)
Verify the document from file quid with list of VerifyOptions
|
VerificationResult |
verify(String guid,
VerifyOptions verifyOptions,
LoadOptions loadOptions)
Verify the document from file quid with VerifyOptions and specified Load Options
|
public SignatureHandler()
Instantiate the SignatureHandler with default SignatureConfig
, IInputDataHandler
and IOutputDataHandler
All files will be loaded from local file system
public SignatureHandler(SignatureConfig signatureConfig)
Instantiate the SignatureHandler with default IInputDataHandler
and IOutputDataHandler
All files will be loaded from local file system
signatureConfig
- Instance of SignatureConfig
public SignatureHandler(SignatureConfig signatureConfig, IInputDataHandler inputDataHandler)
Instantiate the SignatureHandler with default IOutputDataHandler
and custom IInputDataHandler
implementation
signatureConfig
- Instance of SignatureConfig
inputDataHandler
- Custom implementation of IInputDataHandler
interfacepublic SignatureHandler(SignatureConfig signatureConfig, IOutputDataHandler outputDataHandler)
Instantiate the SignatureHandler with default IInputDataHandler
and custom IOutputDataHandler
implementation
signatureConfig
- Instance of SignatureConfig
outputDataHandler
- Custom implementation of IOutputDataHandler
interfacepublic SignatureHandler(SignatureConfig signatureConfig, IInputDataHandler inputDataHandler, IOutputDataHandler outputDataHandler)
Instantiate the SignatureHandler with custom IInputDataHandler
and IOutputDataHandler
implementation
signatureConfig
- Instance of SignatureConfig
inputDataHandler
- Custom implementation of IInputDataHandler
interfaceoutputDataHandler
- Custom implementation of IOutputDataHandler
interfacepublic SignatureHandler(SignatureConfig signatureConfig, com.groupdocs.signature.domain.interfaces.IFileNameCompositor fileNameCompositor)
@Deprecated public static DocumentDescription getPageDescriptions(String guid) throws Exception
Gets information about document pages: their sizes, maximum page height, the width of a page with the maximum height.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt,
relative path e.g document.txt, URL e.g. http://site.com/document.txt.Exception
@Deprecated public static byte[] getDocumentPageImage(String guid, Integer width, Integer quality, int pageIndex) throws Exception
Returns an image of a specified page.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt,
relative path e.g document.txt, URL e.g. http://site.com/document.txt.width
- A required width of images.quality
- A required quality of images.pageIndex
- The number of a page to get image for.Exception
@Deprecated public static Dimension getPageSize(String guid, int signaturePageNumber, double signatureLocationX, double signatureLocationY, PositionInCellsDocument positionInCellsDocument) throws Exception
Gets the size of a page of a document.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt,
relative path e.g document.txt, URL e.g. http://site.com/document.txt.signaturePageNumber
- The number of the page.signatureLocationX
- The X coordinate of a signature for Cells files.signatureLocationY
- The Y coordinate of a signature for Cells files.positionInCellsDocument
- The row and column number of the nearest to the signature cell are returned in this object for Cells files.Exception
public SignatureConfig getSignatureConfig()
Signature Configuration with file location paths options
public T sign(String guid, SignOptions signOptions) throws Exception
Sign the document from file quid with SignOptions
guid
- File guidsignOptions
- Signature OptionsException
public T sign(String guid, SignOptions signOptions, LoadOptions loadOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
guid
- File guidsignOptions
- Signature OptionsloadOptions
- Load OptionsException
public T sign(String guid, SignOptions signOptions, SaveOptions saveOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
guid
- File guidsignOptions
- Signature OptionssaveOptions
- Save OptionsException
public T sign(String guid, SignOptions signOptions, LoadOptions loadOptions, SaveOptions saveOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
guid
- File guidsignOptions
- Signature OptionsloadOptions
- Load OptionssaveOptions
- Save OptionsException
public T sign(InputStream stream, SignOptions signOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
stream
- Input StreamsignOptions
- Signature OptionsException
public T sign(InputStream stream, SignOptions signOptions, LoadOptions loadOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
stream
- Input StreamsignOptions
- Signature OptionsloadOptions
- Load OptionsException
public T sign(InputStream stream, SignOptions signOptions, SaveOptions saveOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
stream
- Input StreamsignOptions
- Signature OptionssaveOptions
- Save OptionsException
public T sign(InputStream stream, SignOptions signOptions, LoadOptions loadOptions, SaveOptions saveOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
stream
- Input StreamsignOptions
- Signature OptionsloadOptions
- Load OptionssaveOptions
- Save OptionsException
public T sign(String guid, SignatureOptionsCollection collection) throws Exception
Sign the document from file quid with list of SignOptions
guid
- File guidcollection
- Collection of options. Instance of SignatureOptionsCollection
Exception
public T sign(String guid, SignatureOptionsCollection collection, LoadOptions loadOptions) throws Exception
Sign the document from file quid with List of Signature Options and Load Options
guid
- File guidcollection
- Collection of options. Instance of SignatureOptionsCollection
loadOptions
- Load OptionsException
public T sign(String guid, SignatureOptionsCollection collection, SaveOptions saveOptions) throws Exception
Sign the document from file quid with Signature Options and Save options
guid
- File guidcollection
- Collection of options. Instance of SignatureOptionsCollection
saveOptions
- Save OptionsException
public T sign(String guid, SignatureOptionsCollection collection, LoadOptions loadOptions, SaveOptions saveOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
guid
- File guidcollection
- Collection of options. Instance of SignatureOptionsCollection
loadOptions
- Load OptionssaveOptions
- Save OptionsException
public T sign(InputStream stream, SignatureOptionsCollection collection) throws Exception
Sign the document from file quid with SignOptions, load and save options
stream
- Input Streamcollection
- Collection of options. Instance of SignatureOptionsCollection
Exception
public T sign(InputStream stream, SignatureOptionsCollection collection, LoadOptions loadOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
stream
- Input Streamcollection
- Collection of options. Instance of SignatureOptionsCollection
loadOptions
- Load OptionsException
public T sign(InputStream stream, SignatureOptionsCollection collection, SaveOptions saveOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
stream
- Input Streamcollection
- Collection of options. Instance of SignatureOptionsCollection
saveOptions
- Save OptionsException
public T sign(InputStream stream, SignatureOptionsCollection collection, LoadOptions loadOptions, SaveOptions saveOptions) throws Exception
Sign the document from file quid with SignOptions, load and save options
stream
- Input Streamcollection
- Collection of options. Instance of SignatureOptionsCollection
loadOptions
- Load OptionssaveOptions
- Save OptionsException
public VerificationResult verify(String guid, VerifyOptions verifyOptions) throws Exception
Verify the document from file guid with VerifyOptions
guid
- File guidverifyOptions
- Signature Verification OptionsVerificationResult
. Property VerificationResult.IsValid returns true if verification process was successfulException
public VerificationResult verify(String guid, VerifyOptions verifyOptions, LoadOptions loadOptions) throws Exception
Verify the document from file quid with VerifyOptions and specified Load Options
guid
- File guidverifyOptions
- Signature Verification OptionsloadOptions
- Load Document OptionsVerificationResult
. Property VerificationResult.IsValid returns true if verification process was successfulException
public VerificationResult verify(InputStream stream, VerifyOptions verifyOptions) throws Exception
Verify the document from stream with VerifyOptions
stream
- Input StreamverifyOptions
- Signature Verification OptionsVerificationResult
. Property VerificationResult.IsValid returns true if verification process was successfulException
public VerificationResult verify(InputStream stream, VerifyOptions verifyOptions, LoadOptions loadOptions) throws Exception
Verify the document from stream with VerifyOptions
stream
- Input StreamverifyOptions
- Signature Verification OptionsloadOptions
- Load Document OptionsVerificationResult
. Property VerificationResult.IsValid returns true if verification process was successfulException
public VerificationResult verify(String guid, VerifyOptionsCollection collection) throws Exception
Verify the document from file quid with list of VerifyOptions
guid
- File guidcollection
- Collection of Verification Options. Instance of VerifyOptionsCollection
VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successfulException
public VerificationResult verify(String guid, VerifyOptionsCollection collection, LoadOptions loadOptions) throws Exception
Verify the document from file quid with list of VerifyOptions
guid
- File guidcollection
- Collection of Verification Options. Instance of VerifyOptionsCollection
loadOptions
- Load OptionsVerificationResult
. Property VerificationResult.IsValid returns true if verification process was successfulException
public VerificationResult verify(InputStream stream, VerifyOptionsCollection collection) throws Exception
Verify the document from file quid with list of VerifyOptions
stream
- Input Streamcollection
- Collection of Verification Options. Instance of VerifyOptionsCollection
VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successfulException
public VerificationResult verify(InputStream stream, VerifyOptionsCollection collection, LoadOptions loadOptions) throws Exception
Verify the document from file quid with list of VerifyOptions
stream
- Input Streamcollection
- Collection of Verification Options. Instance of VerifyOptionsCollection
loadOptions
- Load OptionsVerificationResult
. Property VerificationResult.IsValid returns true if verification process was successfulException
public DocumentDescription getDocumentDescription(String guid, String password) throws Exception
Gets information about document pages: their sizes, maximum page height, the width of a page with the maximum height.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt,
relative path e.g document.txt, URL e.g. http://site.com/document.txt.password
- Document password.Exception
public DocumentDescription getDocumentDescription(InputStream stream, String password) throws Exception
Gets information about document pages: their sizes, maximum page height, the width of a page with the maximum height.
stream
- Input stream.password
- Document password.Exception
public byte[] getPageImage(String guid, int pageNumber, String password, Integer width, Integer quality) throws Exception
Returns an image of a specified page.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt,
relative path e.g document.txt, URL e.g. http://site.com/document.txt.pageNumber
- The number of a page to get image for. Min value is 1.password
- Document password.width
- A required width of images.quality
- A required quality of images.Exception
public byte[] getPageImage(InputStream stream, int pageNumber, String password, Integer width, Integer quality) throws Exception
Returns an image of a specified page.
stream
- Document stream.pageNumber
- The number of a page to get image for. Min value is 1.password
- Document password.width
- A required width of images.quality
- A required quality of images.Exception
public Dimension getDocumentPageSize(String guid, int pageNumber, String password, double signatureLocationXforCells, double signatureLocationYforCells, PositionInCellsDocument positionInCellsDocument) throws Exception
Gets the size of a page of a document.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt,
relative path e.g document.txt, URL e.g. http://site.com/document.txt.pageNumber
- The number of a page to get size for. Min value is 1.password
- Document password.signatureLocationXforCells
- The X coordinate of a signature for Cells files.signatureLocationYforCells
- The Y coordinate of a signature for Cells files.positionInCellsDocument
- The row and column number of the nearest to the signature cell
are returned in this object for Cells files.Exception
public Dimension getDocumentPageSize(InputStream stream, int pageNumber, String password, double signatureLocationXforCells, double signatureLocationYforCells, PositionInCellsDocument positionInCellsDocument) throws Exception
Gets the size of a page of a document.
stream
- Document stream.pageNumber
- The number of a page to get size for. Min value is 1.password
- Document password.signatureLocationXforCells
- The X coordinate of a signature for Cells files.signatureLocationYforCells
- The Y coordinate of a signature for Cells files.positionInCellsDocument
- The row and column number of the nearest to the signature cell
are returned in this object for Cells files.Exception
Copyright © 2017. All rights reserved.