Class to represent PDF signature. More...
Public Member Functions | |
Boolean | Verify (Pause^ pause) |
Verify a signature. More... | |
Boolean | Sign (Stream^ savefileStream, Pause^ pause) |
Sign a signature. More... | |
void | ClearData () |
Clear signature data and appearance. More... | |
Boolean | IsSigned () |
Check whether current signature is signed or not. More... | |
SigState | GetState () |
Get current state after current signature is verified by Foxit PDF SDK. More... | |
Boolean | ResetAppearanceStream () |
Reset the appearance stream if current signature is still unsigned. More... | |
Int32 | GetPageIndex () |
Get the index of a PDF page which contains current signature. More... | |
String^ | GetPreferredFilter () |
Get the filter name of the preferred signature handler, which will be used to validate current signature. More... | |
String^ | GetPreferredSubFilter () |
Get the sub-filter name of the preferred signature handler, which will be used to validate current signature. More... | |
void | SetPreferredFilter (String^ filter) |
Set the filter name, which will be used for choosing a registered signature handler for current signature. More... | |
void | SetPreferredSubFilter (String^ subfilter) |
Set the sub-filter name, which will be used for choosing a registered signature handler for current signature. More... | |
UInt32 | GetAnnotFlags () |
Get annotation flags. More... | |
void | SetAnnotFlags (UInt32 flags) |
Set annotation flags. More... | |
UInt32 | GetAppearanceFlags () |
Get signature appearance flags. More... | |
void | SetAppearanceFlags (UInt32 apFlags) |
Set signature appearance flags. More... | |
String^ | GetSigner () |
Get signer name. More... | |
void | SetSigner (String^ signer) |
Set signer name. More... | |
DateTime^ | GetSigningTime () |
Get time of signing. More... | |
String^ | GetLocation () |
Get location information of the signature owner. More... | |
void | SetLocation (String^ location) |
Set location information, such as CPU host name or physical location. More... | |
String^ | GetReason () |
Get the signing reason. More... | |
void | SetReason (String^ reason) |
Set the signing reason. More... | |
String^ | GetContactInfo () |
Get contact information. More... | |
void | SetContactInfo (String^ contactInfo) |
Set contact information. More... | |
String^ | GetDistinguishedName () |
Get distinguished name of the signature owner. More... | |
void | SetDistinguishedName (String^ dn) |
Set distinguished name of the signer. More... | |
String^ | GetText () |
Get the text content shown for the appearance. More... | |
void | SetText (String^ text) |
Set the text content. More... | |
void | SetBitmap (PixelSource^ pixelSource) |
Set a bitmap for the signature appearance. More... | |
Int32 | CountCerts () |
Count certificates in the certificate chain of current signature. More... | |
String^ | GetCert (Int32 index) |
Get a signature certificate name from certificate chain of current signature. More... | |
void | SetCertChain (const List< String^ >^certChain) |
Set a certificate chain. More... | |
Properties | |
Int64 | pointer |
Pointer to a handle of PDF signature object. This pointer is not useful outside this SDK. The application should not access the pointer to the handle of the PDF signature object directly. | |
Class to represent PDF signature.
A digital signature (PDF 1.3) can be used to authenticate the identity of a user and the document’s contents.
void Foxit::PDF::Signature::ClearData | ( | ) |
Clear signature data and appearance.
Usually, this function is called to clear signed signature data and appearance.
Int32 Foxit::PDF::Signature::CountCerts | ( | ) |
Count certificates in the certificate chain of current signature.
If current preferred sub-filter is "adbe.x509.rsa_sha1", application needs to get verified public certificate before verifying signature by calling this function and function Signature::GetCert.
UInt32 Foxit::PDF::Signature::GetAnnotFlags | ( | ) |
Get annotation flags.
A signature field is also a widget annotations, so a signature field can hava annotation flags.
UInt32 Foxit::PDF::Signature::GetAppearanceFlags | ( | ) |
Get signature appearance flags.
Signature appearance flags indicate which information will be shown.
String ^ Foxit::PDF::Signature::GetCert | ( | Int32 | index | ) |
Get a signature certificate name from certificate chain of current signature.
If current preferred sub-filter is "adbe.x509.rsa_sha1", application needs to get verified public certificate before verifying signature by calling this function and function Signature::CountCerts.
[in] | index | A zero-based index of annotation to be got. Range: 0 to (certCount-1). certCount is returned by function Signature::CountCerts. |
String ^ Foxit::PDF::Signature::GetContactInfo | ( | ) |
Get contact information.
Contact information provides methods about how to contact the signer. It can include mail, telephone etc.
String ^ Foxit::PDF::Signature::GetDistinguishedName | ( | ) |
Get distinguished name of the signature owner.
String ^ Foxit::PDF::Signature::GetLocation | ( | ) |
Get location information of the signature owner.
Location information of signer can be the host, MAC address, or a specific physical address. For example "FZ".
Int32 Foxit::PDF::Signature::GetPageIndex | ( | ) |
Get the index of a PDF page which contains current signature.
String ^ Foxit::PDF::Signature::GetPreferredFilter | ( | ) |
Get the filter name of the preferred signature handler, which will be used to validate current signature.
String ^ Foxit::PDF::Signature::GetPreferredSubFilter | ( | ) |
Get the sub-filter name of the preferred signature handler, which will be used to validate current signature.
Sub-filter is used to describe the encoding used for signature value and key information.
String ^ Foxit::PDF::Signature::GetReason | ( | ) |
Get the signing reason.
String ^ Foxit::PDF::Signature::GetSigner | ( | ) |
Get signer name.
DateTime ^ Foxit::PDF::Signature::GetSigningTime | ( | ) |
Get time of signing.
SigState Foxit::PDF::Signature::GetState | ( | ) |
Get current state after current signature is verified by Foxit PDF SDK.
This function is only useful if a signature has just been verified by Foxit PDF SDK. For other cases, this function is useless and the returned state is helpless.
String ^ Foxit::PDF::Signature::GetText | ( | ) |
Get the text content shown for the appearance.
Boolean Foxit::PDF::Signature::IsSigned | ( | ) |
Check whether current signature is signed or not.
Boolean Foxit::PDF::Signature::ResetAppearanceStream | ( | ) |
Reset the appearance stream if current signature is still unsigned.
This function can only be used to signature object which is unsigned.
void Foxit::PDF::Signature::SetAnnotFlags | ( | UInt32 | flags | ) |
Set annotation flags.
A signature field is also a widget annotations, so a signature field can hava annotation flags.
[in] | flags | Value of flags. Please refer to enumeration Annotations::Flags and this can be one or combination of its values. |
void Foxit::PDF::Signature::SetAppearanceFlags | ( | UInt32 | apFlags | ) |
Set signature appearance flags.
Signature appearance flags indicate which information will be shown.
[in] | apFlags | Value of signature appearance flags. Please refer to enumeration PDF::SigAppearanceFlags and this can be one or combination of its values. |
void Foxit::PDF::Signature::SetBitmap | ( | PixelSource^ | pixelSource | ) |
Set a bitmap for the signature appearance.
Among the supported format defined in comment PixelSource::Format, this function does not support 16bpp rbg565 or 32bpp rgbx currently.
[in] | pixelSource | A Foxit::PixelSource object that specifies the bitmap data. Please ensure all the properties of this object are valid. |
void Foxit::PDF::Signature::SetCertChain | ( | const List< String^ >^ | certChain | ) |
Set a certificate chain.
If current preferred sub-filter is "adbe.x509.rsa_sha1", application needs to set the certificate chain.
[in] | certChain | A String array that specifies the certificate chain to be set. It should be valid and contains at least one valid element. |
void Foxit::PDF::Signature::SetContactInfo | ( | String^ | contactInfo | ) |
Set contact information.
Contact information provides methods about how to contact the signer. It can include mail, telephone etc.
[in] | contactInfo | A String object that specifies the contact information. |
void Foxit::PDF::Signature::SetDistinguishedName | ( | String^ | dn | ) |
Set distinguished name of the signer.
[in] | dn | A String object that specifies the distinguished name. |
void Foxit::PDF::Signature::SetLocation | ( | String^ | location | ) |
Set location information, such as CPU host name or physical location.
Location information of signer can be the host, MAC address, or a specific physical address. For example "FZ".
[in] | location | A String object that specifies the location information. |
void Foxit::PDF::Signature::SetPreferredFilter | ( | String^ | filter | ) |
Set the filter name, which will be used for choosing a registered signature handler for current signature.
[in] | filter | A String object that specifies the filter name. This should be valid, and cannot be nullptr or empty. |
void Foxit::PDF::Signature::SetPreferredSubFilter | ( | String^ | subfilter | ) |
Set the sub-filter name, which will be used for choosing a registered signature handler for current signature.
[in] | subfilter | A String object that specifies the sub-filter name. |
void Foxit::PDF::Signature::SetReason | ( | String^ | reason | ) |
Set the signing reason.
[in] | reason | A String object that specifies the signing reason. |
void Foxit::PDF::Signature::SetSigner | ( | String^ | signer | ) |
Set signer name.
[in] | signer | A String object that specifies the signer name. |
void Foxit::PDF::Signature::SetText | ( | String^ | text | ) |
Set the text content.
[in] | text | A String object that specifies the text content. |
Boolean Foxit::PDF::Signature::Sign | ( | Stream^ | savefileStream, |
Pause^ | pause | ||
) |
Sign a signature.
A signature object contains the filter and sub-filter name of a preferred signature handler, which will be used to sign and verify the signature. Before signing a signature, application should ensure that the preferred signature handler has been registered by calling function Library::RegisterSignatureHandler.
[in] | savefileStream | A Stream object that specifies the PDF document to save the signing result. Currently, only support FileStream. User should ensure this stream can be written and should close this stream after signing process is finished. |
[in] | pause | (Reserved, should be nullptr currently) A Foxit::Pause object that specifies the pause control for signing a signature in progressive process. |
Boolean Foxit::PDF::Signature::Verify | ( | Pause^ | pause | ) |
Verify a signature.
A signature object contains the filter and sub-filter name of a preferred signature handler, which will be used to sign and verify the signature. Before verifying a signature, application should ensure that the preferred signature handler has been registered by calling function Library::RegisterSignatureHandler.
[in] | pause | (Reserved, should be nullptr currently) A Foxit::Pause object that specifies the pause control for verifying a signature in progressive process. |