public class SignatureHandler<T> extends Object
Use instance of SignatureHandler class to sign documents with text, image or digital signatures.
Constructor and Description |
---|
SignatureHandler()
Instantiate the SignatureHandler with default
SignatureConfig (getSignatureConfig() /setSignatureConfig(SignatureConfig) ), IInputDataHandler and IOutputDataHandler . |
SignatureHandler(SignatureConfig signatureConfig)
Instantiate the SignatureHandler with default
IInputDataHandler and IOutputDataHandler . |
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.
|
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.
|
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.
|
SignatureConfig |
getSignatureConfig()
Signature Configuration with file location paths options.
|
SearchResult |
search(InputStream stream,
SearchOptions searchOptions)
Search for Signatures in Document from stream by
SearchOptions options. |
SearchResult |
search(InputStream stream,
SearchOptionsCollection collection,
LoadOptions loadOptions)
Search for Signatures in Document from stream by
SearchOptions options. |
SearchResult |
search(InputStream stream,
SearchOptions searchOptions,
LoadOptions loadOptions)
Search for Signatures in Document from stream by
SearchOptions options. |
SearchResult |
search(String guid,
SearchOptions searchOptions)
Search for Signatures in Document from guid by
SearchOptions options. |
SearchResult |
search(String guid,
SearchOptionsCollection collection,
LoadOptions loadOptions)
Search for Signatures in Document from guid by
SearchOptions options. |
SearchResult |
search(String guid,
SearchOptions searchOptions,
LoadOptions loadOptions)
Search for Signatures in Document from guid by
SearchOptions 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 guid 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 final ProcessEvents<ProcessCompleteEventHandler> SearchCompleted
public final ProcessEvents<ProcessProgressEventHandler> SearchProgress
public final ProcessEvents<ProcessStartEventHandler> SearchStarted
public final ProcessEvents<ProcessCompleteEventHandler> SignatureCompleted
public final ProcessEvents<ProcessProgressEventHandler> SignatureProgress
public final ProcessEvents<ProcessStartEventHandler> SignatureStarted
public final ProcessEvents<ProcessCompleteEventHandler> VerificationCompleted
public final ProcessEvents<ProcessProgressEventHandler> VerificationProgress
public final ProcessEvents<ProcessStartEventHandler> VerificationStarted
public SignatureHandler()
Instantiate the SignatureHandler with default SignatureConfig
(getSignatureConfig()
/setSignatureConfig(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
.
signatureConfig
- Instance of SignatureConfig
(getSignatureConfig()
/setSignatureConfig(SignatureConfig)
).public SignatureHandler(SignatureConfig signatureConfig, IInputDataHandler inputDataHandler)
Instantiate the SignatureHandler with default IOutputDataHandler
and custom IInputDataHandler
implementation.
signatureConfig
- Instance of SignatureConfig
(getSignatureConfig()
/setSignatureConfig(SignatureConfig)
).inputDataHandler
- Custom implementation of IInputDataHandler
interface.public SignatureHandler(SignatureConfig signatureConfig, IInputDataHandler inputDataHandler, IOutputDataHandler outputDataHandler)
Instantiate the SignatureHandler with custom IInputDataHandler
and IOutputDataHandler
implementation.
signatureConfig
- Instance of SignatureConfig
(getSignatureConfig()
/setSignatureConfig(SignatureConfig)
).inputDataHandler
- Custom implementation of IInputDataHandler
interface.outputDataHandler
- Custom implementation of IOutputDataHandler
interface.public SignatureHandler(SignatureConfig signatureConfig, IOutputDataHandler outputDataHandler)
Instantiate the SignatureHandler with default IInputDataHandler
and custom IOutputDataHandler
implementation.
signatureConfig
- Instance of SignatureConfig
(getSignatureConfig()
/setSignatureConfig(SignatureConfig)
).outputDataHandler
- Custom implementation of IOutputDataHandler
interface.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 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 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
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 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 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 final SignatureConfig getSignatureConfig()
Signature Configuration with file location paths options.
public SearchResult search(InputStream stream, SearchOptions searchOptions) throws Exception
Search for Signatures in Document from stream by SearchOptions
options.
stream
- Document stream.searchOptions
- Search Options.SearchResult
SearchResult with list of found Signatures.Exception
public SearchResult search(InputStream stream, SearchOptionsCollection collection, LoadOptions loadOptions) throws Exception
Search for Signatures in Document from stream by SearchOptions
options.
stream
- Document stream.collection
- Search Options Collection.loadOptions
- Load Options.SearchResult
SearchResult with list of found Signatures.Exception
public SearchResult search(InputStream stream, SearchOptions searchOptions, LoadOptions loadOptions) throws Exception
Search for Signatures in Document from stream by SearchOptions
options.
stream
- Document stream.searchOptions
- Search Options.loadOptions
- Load Options.SearchResult
SearchResult with list of found Signatures.Exception
public SearchResult search(String guid, SearchOptions searchOptions) throws Exception
Search for Signatures in Document from guid by SearchOptions
options.
guid
- Document guid.searchOptions
- Search Options.SearchResult
SearchResult with list of found Signatures.Exception
public SearchResult search(String guid, SearchOptionsCollection collection, LoadOptions loadOptions) throws Exception
Search for Signatures in Document from guid by SearchOptions
options.
guid
- Document guid.collection
- Search Options Collection.loadOptions
- Load Options.SearchResult
SearchResult with list of found Signatures.Exception
public SearchResult search(String guid, SearchOptions searchOptions, LoadOptions loadOptions) throws Exception
Search for Signatures in Document from guid by SearchOptions
options.
guid
- Document guid.searchOptions
- Search Options.loadOptions
- Load Options.SearchResult
SearchResult with list of found Signatures.Exception
public T sign(InputStream stream, SignatureOptionsCollection collection) throws Exception
Sign the document from file quid with SignOptions, load and save options.
stream
- Input Stream.collection
- 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 Stream.collection
- Collection of options. Instance of SignatureOptionsCollection
.loadOptions
- Load Options.Exception
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 Stream.collection
- Collection of options. Instance of SignatureOptionsCollection
.loadOptions
- Load Options.saveOptions
- Save Options.Exception
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 Stream.collection
- Collection of options. Instance of SignatureOptionsCollection
.saveOptions
- Save Options.Exception
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, 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(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(String guid, SignatureOptionsCollection collection) throws Exception
Sign the document from file quid with list of SignOptions.
guid
- File guid.collection
- Collection of options. Instance of SignatureOptionsCollection
.Exception
public T sign(String guid, SignatureOptionsCollection collection, LoadOptions loadOptions) throws Exception
Sign the document from file guid with List of Signature Options and Load Options.
guid
- File guid.collection
- Collection of options. Instance of SignatureOptionsCollection
.loadOptions
- Load 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 guid.collection
- Collection of options. Instance of SignatureOptionsCollection
.loadOptions
- Load Options.saveOptions
- Save Options.Exception
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 guid.collection
- Collection of options. Instance of SignatureOptionsCollection
.saveOptions
- Save Options.Exception
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, 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(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 VerificationResult verify(InputStream stream, VerifyOptions verifyOptions) throws Exception
Verify the document from stream with VerifyOptions.
stream
- Input Stream.verifyOptions
- Signature Verification Options.VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successful.Exception
public VerificationResult verify(InputStream stream, VerifyOptionsCollection collection) throws Exception
Verify the document from file quid with list of VerifyOptions.
stream
- Input Stream.collection
- Collection of Verification Options. Instance of VerifyOptionsCollection
.VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successful.Exception
public VerificationResult verify(InputStream stream, VerifyOptionsCollection collection, LoadOptions loadOptions) throws Exception
Verify the document from file quid with list of VerifyOptions.
stream
- Input Stream.collection
- Collection of Verification Options. Instance of VerifyOptionsCollection
.loadOptions
- Load Options.VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successful.Exception
public VerificationResult verify(InputStream stream, VerifyOptions verifyOptions, LoadOptions loadOptions) throws Exception
Verify the document from stream with VerifyOptions.
stream
- Input Stream.verifyOptions
- Signature Verification Options.loadOptions
- Load Document Options.VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successful.Exception
public VerificationResult verify(String guid, VerifyOptions verifyOptions) throws Exception
Verify the document from file guid with VerifyOptions.
guid
- File guid.verifyOptions
- Signature Verification Options.VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successful.Exception
public VerificationResult verify(String guid, VerifyOptionsCollection collection) throws Exception
Verify the document from file quid with list of VerifyOptions.
guid
- File guid.collection
- Collection of Verification Options. Instance of VerifyOptionsCollection
.VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successful.Exception
public VerificationResult verify(String guid, VerifyOptionsCollection collection, LoadOptions loadOptions) throws Exception
Verify the document from file quid with list of VerifyOptions.
guid
- File guid.collection
- Collection of Verification Options. Instance of VerifyOptionsCollection
.loadOptions
- Load Options.VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successful.Exception
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 guid.verifyOptions
- Signature Verification Options.loadOptions
- Load Document Options.VerificationResult
. Property VerificationResult.IsValid returns true if verification process was successful.Exception
Copyright © 2019. All rights reserved.