Definitions for signature related operation.
Definitions and functions in this module are included in fpdf_signature_r.h and fpdf_signature_w.h.
Module: PDFSignature
License Identifier: PDFSignature/All
Available License Right: Reading/Writing.
For License Right Reading, see fpdf_signature_r.h.
For License Right Writing, see fpdf_signature_w.h.
More...
Classes | |
struct | FSPDF_SIGNATURE |
Handle type to PDF signature. More... | |
struct | FSPDF_SIGNATUREHANDLER |
Structure for Signature Handler. More... | |
struct | FSPDF_SIGNATUREICONPROVIDER |
Structure for Signature Icon Provider Handler. More... | |
Functions | |
FS_RESULT | FSPDF_Signature_RegisterHandler (const FSCRT_BSTR *filter, const FSCRT_BSTR *subFilter, FSPDF_SIGNATUREHANDLER *sigHandler) |
A third-party handler registers their handler to Foxit PDF SDK, along with its filter and sub filter. More... | |
FS_RESULT | FSPDF_Signature_SetIconProvider (FSPDF_SIGNATUREICONPROVIDER *iconProvider) |
Set signature icon provider to Foxit PDF SDK. More... | |
FS_RESULT | FSPDF_Doc_CountSignatures (FSCRT_DOCUMENT doc, FS_INT32 *count) |
Get signature count in a PDF document. More... | |
FS_RESULT | FSPDF_Doc_GetSignature (FSCRT_DOCUMENT doc, FS_INT32 index, FSPDF_SIGNATURE *sig) |
Get a signature object. More... | |
FS_RESULT | FSPDF_Signature_GetAtPos (FSCRT_PAGE page, FS_FLOAT x, FS_FLOAT y, FS_FLOAT tolerance, FSPDF_SIGNATURE *sig) |
Get a signature object by a specific position in PDF page. More... | |
FS_RESULT | FSPDF_Signature_GetDoc (FSPDF_SIGNATURE sig, FSCRT_DOCUMENT *doc) |
Retrieve the PDF document object related to a specific signature. More... | |
FS_RESULT | FSPDF_Signature_GetPageIndex (FSPDF_SIGNATURE sig, FS_INT32 *pageIndex) |
Get the index of a PDF page containing the specified signature. More... | |
FS_RESULT | FSPDF_Signature_GetFlags (FSPDF_SIGNATURE sig, FS_DWORD *flags) |
Get annotation flags of a signature. More... | |
FS_RESULT | FSPDF_Signature_GetFilter (FSPDF_SIGNATURE sig, FSCRT_BSTR *filter) |
Get the name of the preferred signature handler. More... | |
FS_RESULT | FSPDF_Signature_GetSubFilter (FSPDF_SIGNATURE sig, FSCRT_BSTR *subFilter) |
Get sub filter of a signature. More... | |
FS_RESULT | FSPDF_Signature_GetSigner (FSPDF_SIGNATURE sig, FSCRT_BSTR *signer) |
Get signer name of a signature. More... | |
FS_RESULT | FSPDF_Signature_GetDateTime (FSPDF_SIGNATURE sig, FSCRT_DATETIMEZONE *dt) |
Get signing time of a signature(M entry in the dictionary). More... | |
FS_RESULT | FSPDF_Signature_GetLocation (FSPDF_SIGNATURE sig, FSCRT_BSTR *location) |
Get location information of signature owner(Location entry in the dictionary). More... | |
FS_RESULT | FSPDF_Signature_GetReason (FSPDF_SIGNATURE sig, FSCRT_BSTR *reason) |
Get signing reason of a signature. More... | |
FS_RESULT | FSPDF_Signature_GetContactInfo (FSPDF_SIGNATURE sig, FSCRT_BSTR *contactInfo) |
Get contact information of a signature. More... | |
FS_RESULT | FSPDF_Signature_GetDistinguishedName (FSPDF_SIGNATURE sig, FSCRT_BSTR *dn) |
Get distinguished name of the signature owner. More... | |
FS_RESULT | FSPDF_Signature_GetText (FSPDF_SIGNATURE sig, FSCRT_BSTR *text) |
Get the text content out of signature appearance. More... | |
FS_RESULT | FSPDF_Signature_GetBitmap (FSPDF_SIGNATURE sig, FSCRT_BITMAP *bitmap) |
Get the icon bitmap in signature visual display. More... | |
FS_RESULT | FSPDF_Signature_GetAppearanceFlags (FSPDF_SIGNATURE sig, FS_DWORD *apFlags) |
Get signature appearance flags. More... | |
FS_RESULT | FSPDF_Signature_CountCerts (FSPDF_SIGNATURE sig, FS_INT32 *certCount) |
Count of certificates in the dictionary's certificate chain. More... | |
FS_RESULT | FSPDF_Signature_GetCert (FSPDF_SIGNATURE sig, FS_INT32 index, FSCRT_BSTR *signedCert) |
Get a signature certificate name from certificate chain. More... | |
FS_RESULT | FSPDF_Signature_StartVerify (FSPDF_SIGNATURE sig, FSCRT_PROGRESS *verifyProgress) |
Verify a signature progressively by using a signature signing handler specified by its Filter and SubFilter. More... | |
FS_RESULT | FSPDF_Signature_GetState (FSPDF_SIGNATURE sig, FS_INT32 *state) |
Get current state of a signature. More... | |
FS_RESULT | FSPDF_Signature_IsSigned (FSPDF_SIGNATURE sig, FS_BOOL *isSigned) |
Determine whether a signature is signed or not. More... | |
FS_RESULT | FSPDF_RenderContext_DrawSignature (FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer, FSPDF_SIGNATURE sig) |
Render a signature on a render context. More... | |
FS_RESULT | FSPDF_RenderContext_StartPageSignatures (FSPDF_RENDERCONTEXT pdfRenderContext, FSCRT_RENDERER renderer, FSCRT_PAGE page, FSCRT_PROGRESS *renderProgress) |
Render all signatures of a page on render context. More... | |
FS_RESULT | FSPDF_Signature_Add (FSCRT_PAGE page, const FSCRT_RECTF *rect, FSPDF_SIGNATURE *sig) |
Add an unsigned signature field without appearance to a specific position in a PDF page. More... | |
FS_RESULT | FSPDF_Signature_Remove (FSPDF_SIGNATURE sig) |
Remove a signature. More... | |
FS_RESULT | FSPDF_Signature_SetFlags (FSPDF_SIGNATURE sig, FS_DWORD flags) |
Set annotation flags of a signature. More... | |
FS_RESULT | FSPDF_Signature_SetFilter (FSPDF_SIGNATURE sig, const FSCRT_BSTR *filter) |
Set the name of the preferred signature handler to use for signature. More... | |
FS_RESULT | FSPDF_Signature_SetSubFilter (FSPDF_SIGNATURE sig, const FSCRT_BSTR *subFilter) |
Set sub filter of a signature. More... | |
FS_RESULT | FSPDF_Signature_SetSigner (FSPDF_SIGNATURE sig, const FSCRT_BSTR *signer) |
Set signer name of a signature. More... | |
FS_RESULT | FSPDF_Signature_SetDateTime (FSPDF_SIGNATURE sig, const FSCRT_DATETIMEZONE *dt) |
Set the signing time of a signature(M entry in the dictionary). More... | |
FS_RESULT | FSPDF_Signature_SetLocation (FSPDF_SIGNATURE sig, const FSCRT_BSTR *location) |
The CPU host name or physical location of the signing. More... | |
FS_RESULT | FSPDF_Signature_SetReason (FSPDF_SIGNATURE sig, const FSCRT_BSTR *reason) |
Set signing reason of a signature. More... | |
FS_RESULT | FSPDF_Signature_SetContactInfo (FSPDF_SIGNATURE sig, const FSCRT_BSTR *contactInfo) |
Set contact information of a signature. More... | |
FS_RESULT | FSPDF_Signature_SetDistinguishedName (FSPDF_SIGNATURE sig, const FSCRT_BSTR *dn) |
Set distinguished name of signer in a signature dictionary. More... | |
FS_RESULT | FSPDF_Signature_SetText (FSPDF_SIGNATURE sig, const FSCRT_BSTR *text) |
Set the text content out of signature appearance. More... | |
FS_RESULT | FSPDF_Signature_SetBitmap (FSPDF_SIGNATURE sig, FSCRT_BITMAP bitmap) |
Set a bitmap to icon in signature display. More... | |
FS_RESULT | FSPDF_Signature_SetImage (FSPDF_SIGNATURE sig, FSCRT_IMAGE image) |
Set an image to icon in signature display. More... | |
FS_RESULT | FSPDF_Signature_SetAppearanceFlags (FSPDF_SIGNATURE sig, FS_DWORD apFlags) |
Set signature appearance flags required for resetting appearance. More... | |
FS_RESULT | FSPDF_Signature_SetCertChain (FSPDF_SIGNATURE sig, const FSCRT_BSTR *certChain, FS_INT32 certCount) |
Set a certificate chain into a signature dictionary. More... | |
FS_RESULT | FSPDF_Signature_ClearData (FSPDF_SIGNATURE sig) |
Clear signature data and its appearance. More... | |
FS_RESULT | FSPDF_Signature_SetDefaultContentsLength (FSPDF_SIGNATURE sig, FS_DWORD contentsLength) |
Set the default length of signature value. More... | |
FS_RESULT | FSPDF_Signature_InitValue (FSPDF_SIGNATURE sig) |
Initialize a signature field. More... | |
FS_RESULT | FSPDF_Signature_StartSign (FSPDF_SIGNATURE sig, FSCRT_FILE savedFile, FSCRT_PROGRESS *signProgress) |
Sign a PDF document progressively by using a signature signing handler specified by its Filter and SubFilter. More... | |
FS_RESULT | FSPDF_Signature_ResetAppearance (FSPDF_SIGNATURE sig) |
Reset the appearance of an unsigned signature field. More... | |
Macro definitions for PDF Signature State | |
#define | FSPDF_SIGNATURE_STATE_UNKNOWN 0 |
Unknown signature. | |
#define | FSPDF_SIGNATURE_STATE_UNSIGNED 1 |
Unsigned signature. | |
#define | FSPDF_SIGNATURE_STATE_VALID 2 |
Valid signature. | |
#define | FSPDF_SIGNATURE_STATE_INVALID 3 |
Invalid signature. | |
#define | FSPDF_SIGNATURE_APPEARANCE_FOXITFLAG 0x0001 |
Show Foxit flag on signature appearance. | |
#define | FSPDF_SIGNATURE_APPEARANCE_LABEL 0x0002 |
Show label on description. | |
#define | FSPDF_SIGNATURE_APPEARANCE_REASON 0x0004 |
Show reason on description. | |
#define | FSPDF_SIGNATURE_APPEARANCE_DATE 0x0008 |
Show date on description. | |
#define | FSPDF_SIGNATURE_APPEARANCE_DN 0x0010 |
Show dn on description. | |
#define | FSPDF_SIGNATURE_APPEARANCE_LOCATION 0x0020 |
Show location on description. | |
#define | FSPDF_SIGNATURE_APPEARANCE_NAME 0x0040 |
Show signer name on description. | |
#define | FSPDF_SIGNATURE_APPEARANCE_IMAGE 0x0080 |
Show image on signature appearance. | |
#define | FSPDF_SIGNATURE_APPEARANCE_TEXT 0x0100 |
Show text on signature appearance. | |
Macro definitions for PDF Signature State Icon Fit Mode | |
#define | FSPDF_SIGNATURE_ICONFITMODE_NORMAL 0 |
Icon fit mode: normal. More... | |
#define | FSPDF_SIGNATURE_ICONFITMODE_FITFIELD 1 |
Icon fit mode: fit field. More... | |
Definitions for signature related operation.
Definitions and functions in this module are included in fpdf_signature_r.h and fpdf_signature_w.h.
Module: PDFSignature
License Identifier: PDFSignature/All
Available License Right: Reading/Writing.
For License Right Reading, see fpdf_signature_r.h.
For License Right Writing, see fpdf_signature_w.h.
This module contains following features:
This module contains following features:
#define FSPDF_SIGNATURE_ICONFITMODE_FITFIELD 1 |
Icon fit mode: fit field.
This flag indicates to display the icon to fit the rectangle of signature.
#define FSPDF_SIGNATURE_ICONFITMODE_NORMAL 0 |
Icon fit mode: normal.
Default size of icon is 32X32 and icon will displayed on the left-top corner of signature.
Get signature count in a PDF document.
[in] | doc | Handle to a FSCRT_DOCUMENT object which is a PDF document object. |
[out] | count | Pointer to a FS_INT32 object that receives the count of total signatures in parameter document. |
Get a signature object.
[in] | doc | Handle to a FSCRT_DOCUMENT object which is a PDF document object. |
[in] | index | Index number starts from 0. |
[out] | sig | Pointer to a FSPDF_SIGNATURE handle that receives the specific signature object. |
FS_RESULT FSPDF_RenderContext_DrawSignature | ( | FSPDF_RENDERCONTEXT | pdfRenderContext, |
FSCRT_RENDERER | renderer, | ||
FSPDF_SIGNATURE | sig | ||
) |
Render a signature on a render context.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a render context object. |
[in] | renderer | Handle to a FSCRT_RENDERER object which is a renderer object. |
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
FS_RESULT FSPDF_RenderContext_StartPageSignatures | ( | FSPDF_RENDERCONTEXT | pdfRenderContext, |
FSCRT_RENDERER | renderer, | ||
FSCRT_PAGE | page, | ||
FSCRT_PROGRESS * | renderProgress | ||
) |
Render all signatures of a page on render context.
This function can only render all normal appearance of signatures.
It will take a long time to render signatures with complex or large contents, so Foxit PDF SDK uses a progressive process to do this.
Caller should pass parameter renderProgress to function FSCRT_Progress_Continue to continue rendering in steps, and should call function FSCRT_Progress_Release to destroy renderProgress object if rendering process is done.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF render context object. |
[in] | renderer | Handle to a FSCRT_RENDERER object which is a renderer object. |
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[out] | renderProgress | Pointer to a FSCRT_PROGRESS handle that receives a handle of progressive process. |
FS_RESULT FSPDF_Signature_Add | ( | FSCRT_PAGE | page, |
const FSCRT_RECTF * | rect, | ||
FSPDF_SIGNATURE * | sig | ||
) |
Add an unsigned signature field without appearance to a specific position in a PDF page.
After adding a signature successfully, please call function FSPDF_Signature_InitValue first to initialize the new signature before using it.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[in] | rect | Pointer to a FSCRT_RECTF structure to specify rectangle position of new signature in PDF page, in PDF page coordinate system. |
[out] | sig | Pointer to a FSPDF_SIGNATURE handle to receive the newly added PDF signature. |
FS_RESULT FSPDF_Signature_ClearData | ( | FSPDF_SIGNATURE | sig | ) |
Clear signature data and its appearance.
Usually, this function is used to clear data and appearance of a signed signature.
After calling this function successfully, if user wants to set and sign this signature again, please call function FSPDF_Signature_InitValue first.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
Count of certificates in the dictionary's certificate chain.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | certCount | Pointer to a FS_INT32 object that receives the count of certificates. |
Get signature appearance flags.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | apFlags | Pointer to a FS_DWORD object receives the signature appearance state. Please refer to macro definitions FSPDF_SIGNATURE_APPEARANCE_XXX and this would be one or a combination of these macros. |
FS_RESULT FSPDF_Signature_GetAtPos | ( | FSCRT_PAGE | page, |
FS_FLOAT | x, | ||
FS_FLOAT | y, | ||
FS_FLOAT | tolerance, | ||
FSPDF_SIGNATURE * | sig | ||
) |
Get a signature object by a specific position in PDF page.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page object. |
[in] | x | Horizontal position in PDF page coordinate system. |
[in] | y | Vertical position in PDF page coordinate system. |
[in] | tolerance | Tolerance value for point, in PDF page coordinate system. Valid value: from 0.0f to 30.0f. |
[out] | sig | Pointer to a FSPDF_SIGNATURE handle that receives the specific signature object. |
FS_RESULT FSPDF_Signature_GetBitmap | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BITMAP * | bitmap | ||
) |
Get the icon bitmap in signature visual display.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | bitmap | Pointer to a FSCRT_BITMAP handle that receives the icon bitmap. |
FS_RESULT FSPDF_Signature_GetCert | ( | FSPDF_SIGNATURE | sig, |
FS_INT32 | index, | ||
FSCRT_BSTR * | signedCert | ||
) |
Get a signature certificate name from certificate chain.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | index | Index number of certificates which starts from 0. |
[out] | signedCert | Pointer to a FSCRT_BSTR structure that receives the certificate. |
FS_RESULT FSPDF_Signature_GetContactInfo | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BSTR * | contactInfo | ||
) |
Get contact information of a signature.
Contact information provides methods about how to contact the signer. It can include mail, telephone etc.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | contactInfo | Pointer to a FSCRT_BSTR structure that receives the contact information. |
FS_RESULT FSPDF_Signature_GetDateTime | ( | FSPDF_SIGNATURE | sig, |
FSCRT_DATETIMEZONE * | dt | ||
) |
Get signing time of a signature(M entry in the dictionary).
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | dt | Pointer to a FSCRT_DATETIMEZONE structure that receives creation time. |
FS_RESULT FSPDF_Signature_GetDistinguishedName | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BSTR * | dn | ||
) |
Get distinguished name of the signature owner.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | dn | Pointer to a FSCRT_BSTR structure that receives the distinguished name of signer. |
FS_RESULT FSPDF_Signature_GetDoc | ( | FSPDF_SIGNATURE | sig, |
FSCRT_DOCUMENT * | doc | ||
) |
Retrieve the PDF document object related to a specific signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | doc | Pointer to a FSCRT_DOCUMENT handle that receives a PDF document object. |
FS_RESULT FSPDF_Signature_GetFilter | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BSTR * | filter | ||
) |
Get the name of the preferred signature handler.
Filter is the name of signature handler,and it will be used to validate this signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | filter | Pointer to a FSCRT_BSTR structure that receives the name of the preferred signature handler to use. |
Get annotation flags of a signature.
A signature field is also a widget annotation. So a signature can have annotation flags.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | flags | Pointer to a FS_DWORD object that receives the flags of signature. Please refer to macros FSPDF_ANNOTFLAG_XXX and this would be one or a combination of these macros. |
FS_RESULT FSPDF_Signature_GetLocation | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BSTR * | location | ||
) |
Get location information of signature owner(Location entry in the dictionary).
Location information of signer can be the host, MAC address, or a specific physical address. For example "FZ".
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | location | Pointer to a FSCRT_BSTR structure that receives the signing location. |
Get the index of a PDF page containing the specified signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | pageIndex | Pointer to a FS_INT32 object that receives the index of a PDF page. Value -1 means error. |
FS_RESULT FSPDF_Signature_GetReason | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BSTR * | reason | ||
) |
Get signing reason of a signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | reason | Pointer to a FSCRT_BSTR structure that receives the signing reason. |
FS_RESULT FSPDF_Signature_GetSigner | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BSTR * | signer | ||
) |
Get signer name of a signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature. |
[out] | signer | Pointer to a FSCRT_BSTR structure that receives signer name. |
Get current state of a signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | state | Pointer to an integer value to receive current state of the signature . Please refer to macro definitions FSPDF_SIGNATURE_STATE_XXX and this would be one of these macros. |
FS_RESULT FSPDF_Signature_GetSubFilter | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BSTR * | subFilter | ||
) |
Get sub filter of a signature.
Sub filter is used to describe the encoding of signature value and key information in the signature dictionary.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | subFilter | Pointer to a FSCRT_BSTR structure that receives a name that describes the encoding of the signature value and key information. |
FS_RESULT FSPDF_Signature_GetText | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BSTR * | text | ||
) |
Get the text content out of signature appearance.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | text | Pointer to a FSCRT_BSTR structure that receives the text content. |
FS_RESULT FSPDF_Signature_InitValue | ( | FSPDF_SIGNATURE | sig | ) |
Initialize a signature field.
This function should be used for a newly added signature field returned by function FSPDF_Signature_Add. When initializing the signature field, the length of signature will be decided by the default setting, then its value would be initialized. The default size of contents length is 8196. User can call function FSPDF_Signature_SetDefaultContentsLength to change the default contents length before calling function FSPDF_Signature_InitValue if necessary. But, if function FSPDF_Signature_SetDefaultContentsLength is called after function FSPDF_Signature_InitValue, some unexpected error may occur.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
Determine whether a signature is signed or not.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | isSigned | Pointer to a FS_BOOL object that receives value indicatess if a signature is signed. |
FS_RESULT FSPDF_Signature_RegisterHandler | ( | const FSCRT_BSTR * | filter, |
const FSCRT_BSTR * | subFilter, | ||
FSPDF_SIGNATUREHANDLER * | sigHandler | ||
) |
A third-party handler registers their handler to Foxit PDF SDK, along with its filter and sub filter.
[in] | filter | Pointer to a FSCRT_BSTR structure to indicate filter of a third-party handler. Filter is the name of handler. |
[in] | subFilter | Pointer to a FSCRT_BSTR structure to indicate sub filter of a third-party handler. Sub filter is to describe the encoding of signature value and key information in the signature dictionary. |
[in] | sigHandler | Pointer to a FSPDF_SIGNATUREHANDLER structure. It is a handler of custom signature. |
FS_RESULT FSPDF_Signature_Remove | ( | FSPDF_SIGNATURE | sig | ) |
Remove a signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
FS_RESULT FSPDF_Signature_ResetAppearance | ( | FSPDF_SIGNATURE | sig | ) |
Reset the appearance of an unsigned signature field.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
Set signature appearance flags required for resetting appearance.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | apFlags | Signature appearance state. Please refer to macro definitions FSPDF_SIGNATURE_APPEARANCE_XXX and this can be one or combination of these macros |
FS_RESULT FSPDF_Signature_SetBitmap | ( | FSPDF_SIGNATURE | sig, |
FSCRT_BITMAP | bitmap | ||
) |
Set a bitmap to icon in signature display.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | bitmap | Handle to a FSCRT_BITMAP object which specifies the icon of signature for visual display. This object cannot be released until funcion FSPDF_Signature_ResetAppearance has been called for this signature object. And application should call function FSCRT_Bitmap_Release to release this FSCRT_BITMAP object. |
FS_RESULT FSPDF_Signature_SetCertChain | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_BSTR * | certChain, | ||
FS_INT32 | certCount | ||
) |
Set a certificate chain into a signature dictionary.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | certChain | Pointer to a FSCRT_BSTR structure of array to specify the cert chain. |
[in] | certCount | Size of certificate chain array. |
FS_RESULT FSPDF_Signature_SetContactInfo | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_BSTR * | contactInfo | ||
) |
Set contact information of a signature.
Contact information provides methods about how to contact to the signer. It may include mail, telephone etc.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | contactInfo | Pointer to a FSCRT_BSTR structure that specifies the contact information. |
FS_RESULT FSPDF_Signature_SetDateTime | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_DATETIMEZONE * | dt | ||
) |
Set the signing time of a signature(M entry in the dictionary).
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | dt | Pointer to a FSCRT_DATETIMEZONE structure that specifies the creation time of the signature. |
Set the default length of signature value.
When initializing the signature field, the length of signature will be decided by the default setting, then its value would be initialized. The default size of contents length is 8196. User can call function FSPDF_Signature_SetDefaultContentsLength to change the default contents length before calling function FSPDF_Signature_InitValue if necessary. But, if function FSPDF_Signature_SetDefaultContentsLength is called after function FSPDF_Signature_InitValue, some unexpected error may occur.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | contentsLength | The length of the signature value, in bytes. It should not be less than 8196, if it is, then SDK would set the length to 8196. It should be a even number. |
FS_RESULT FSPDF_Signature_SetDistinguishedName | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_BSTR * | dn | ||
) |
Set distinguished name of signer in a signature dictionary.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | dn | Pointer to a FSCRT_BSTR structure that specifies the distinguished name of signer. |
FS_RESULT FSPDF_Signature_SetFilter | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_BSTR * | filter | ||
) |
Set the name of the preferred signature handler to use for signature.
Filter is the name of signature handler,and it will be used to validate this signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | filter | Pointer to a FSCRT_BSTR structure to indicate the name of the preferred signature handler to use. |
Set annotation flags of a signature.
A signature field is also a widget annotation. So a signature can have annotation flags.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | flags | Annotation flags used to set to signature. Please refer to macro definitions FSPDF_ANNOTFLAG_XXX and this can be one or a combination of these macros. |
FS_RESULT FSPDF_Signature_SetIconProvider | ( | FSPDF_SIGNATUREICONPROVIDER * | iconProvider | ) |
Set signature icon provider to Foxit PDF SDK.
[in] | iconProvider | Pointer to a FSPDF_SIGNATUREICONPROVIDER structure which is an custom signature icon provider handler. |
FS_RESULT FSPDF_Signature_SetImage | ( | FSPDF_SIGNATURE | sig, |
FSCRT_IMAGE | image | ||
) |
Set an image to icon in signature display.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | image | Pointer to a FSCRT_IMAGE handle which specifies the icon of signature for visual display. This object cannot be released until funcion FSPDF_Signature_ResetAppearance has been called for this signature object. And application should call function FSCRT_Image_Release to release this FSCRT_IMAGE object. |
FS_RESULT FSPDF_Signature_SetLocation | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_BSTR * | location | ||
) |
The CPU host name or physical location of the signing.
Location information of signer: the host, MAC address, or a specific physical address. For example "FZ".
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | location | Pointer to a FSCRT_BSTR structure that specifies the signing location. |
FS_RESULT FSPDF_Signature_SetReason | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_BSTR * | reason | ||
) |
Set signing reason of a signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | reason | Pointer to a FSCRT_BSTR structure that specifies the signing reason. |
FS_RESULT FSPDF_Signature_SetSigner | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_BSTR * | signer | ||
) |
Set signer name of a signature.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature. |
[in] | signer | Pointer to a FSCRT_BSTR structure that specifies the signer name. |
FS_RESULT FSPDF_Signature_SetSubFilter | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_BSTR * | subFilter | ||
) |
Set sub filter of a signature.
Sub filter is used to describe the encoding of signature value and key information in the signature dictionary.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | subFilter | Pointer to FSCRT_BSTR structure that specifies the name describing the encoding of the signature value and key information. |
FS_RESULT FSPDF_Signature_SetText | ( | FSPDF_SIGNATURE | sig, |
const FSCRT_BSTR * | text | ||
) |
Set the text content out of signature appearance.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | text | Pointer to a FSCRT_BSTR structure that specifies the text content. |
FS_RESULT FSPDF_Signature_StartSign | ( | FSPDF_SIGNATURE | sig, |
FSCRT_FILE | savedFile, | ||
FSCRT_PROGRESS * | signProgress | ||
) |
Sign a PDF document progressively by using a signature signing handler specified by its Filter and SubFilter.
It may spend a long time to sign a PDF document, so Foxit PDF SDK uses a progressive process to do this.
Caller should pass signProgress to function FSCRT_Progress_Continue to continue verifying in steps, and should call function FSCRT_Progress_Release to destroy signProgress object if verifying process is over.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[in] | savedFile | Handle to a FSCRT_FILE object. |
[out] | signProgress | Pointer to a FSCRT_PRGRESS handle that receives the signing progressive progress handle. |
FS_RESULT FSPDF_Signature_StartVerify | ( | FSPDF_SIGNATURE | sig, |
FSCRT_PROGRESS * | verifyProgress | ||
) |
Verify a signature progressively by using a signature signing handler specified by its Filter and SubFilter.
It may spend a long time to verify a signature, so Foxit PDF SDK uses a progressive process to do this.
Caller should pass verifyProgress to FSCRT_Progress_Continue to continue verifying in steps, and should call FSCRT_Progress_Release to destroy verifyProgress object if verifying process is over.
[in] | sig | Handle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add. |
[out] | verifyProgress | Pointer to a FSCRT_PROGRESS handle that receives the progressive handle. |