PDF Signature

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...
 

Detailed Description

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:

Macro Definition Documentation

#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.

Function Documentation

FS_RESULT FSPDF_Doc_CountSignatures ( FSCRT_DOCUMENT  doc,
FS_INT32 count 
)

Get signature count in a PDF document.

Parameters
[in]docHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[out]countPointer to a FS_INT32 object that receives the count of total signatures in parameter document.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter doc, or count is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter doc is not a type of PDF document.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if signatures cannot be counted because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • doc: this handle is long-term partially recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Doc_GetSignature ( FSCRT_DOCUMENT  doc,
FS_INT32  index,
FSPDF_SIGNATURE *  sig 
)

Get a signature object.

Parameters
[in]docHandle to a FSCRT_DOCUMENT object which is a PDF document object.
[in]indexIndex number starts from 0.
[out]sigPointer to a FSPDF_SIGNATURE handle that receives the specific signature object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter doc, or sig is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter doc is not a type of PDF document.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_NOTFOUND if parameter index exceeds the range of count of signature in document.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if the signature cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • doc: this handle is long-term partially recoverable.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_RenderContext_DrawSignature ( FSPDF_RENDERCONTEXT  pdfRenderContext,
FSCRT_RENDERER  renderer,
FSPDF_SIGNATURE  sig 
)

Render a signature on a render context.

Parameters
[in]pdfRenderContextHandle to a FSPDF_RENDERCONTEXT object which is a render context object.
[in]rendererHandle to a FSCRT_RENDERER object which is a renderer object.
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pdfRenderContext, renderer, or sig is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNSUPPORTED if the state icon is FSCRT_BITMAPFORMAT_16BPP_RGB565 format.
FSCRT_ERRCODE_ERROR if the signature failed to render because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • pdfRenderContext: this handle is long-term recoverable.
  • renderer: this handle is long-term recoverable.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details. The Context flag FSPDF_RENDERCONTEXTFLAG_NOWIDGET and FSPDF_RENDERCONTEXTFLAG_NOSIGNATURE would be ignored.
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.

Parameters
[in]pdfRenderContextHandle to a FSPDF_RENDERCONTEXT object which is a PDF render context object.
[in]rendererHandle to a FSCRT_RENDERER object which is a renderer object.
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[out]renderProgressPointer to a FSCRT_PROGRESS handle that receives a handle of progressive process.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pdfRenderContext, renderer, page, or renderProgress is NULL.
FSCRT_ERRCODE_UNKNOWNSTATE if page signatures are not loaded.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_ERROR if render signatures fails because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • pdfRenderContext: this handle is long-term recoverable.
  • renderer: this handle is long-term recoverable.
  • page: this handle is long-term partially recoverable.
  • renderProgress: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details. The Context flag FSPDF_RENDERCONTEXTFLAG_NOWIDGET and FSPDF_RENDERCONTEXTFLAG_NOSIGNATURE would be ignored.
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.

Parameters
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[in]rectPointer to a FSCRT_RECTF structure to specify rectangle position of new signature in PDF page, in PDF page coordinate system.
[out]sigPointer to a FSPDF_SIGNATURE handle to receive the newly added PDF signature.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter page, rect, or sig is NULL.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if a signature field with a blank appearance at the specified page cannot be added because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • page: this handle is long-term partially recoverable.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if signed data of a signature field cannot be cleared because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_CountCerts ( FSPDF_SIGNATURE  sig,
FS_INT32 certCount 
)

Count of certificates in the dictionary's certificate chain.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]certCountPointer to a FS_INT32 object that receives the count of certificates.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or certCount is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the number of certificate in the certificate chain cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
When sub filter of signature is adbe.x509.rsa_sha1, application needs to call this function to count certificates in certificate chain and then call function FSPDF_Signature_GetCert to get verified public certificate before verifying signature.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetAppearanceFlags ( FSPDF_SIGNATURE  sig,
FS_DWORD apFlags 
)

Get signature appearance flags.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]apFlagsPointer 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig or apFlags is NULL.
FSCRT_ERRCODE_ERROR if the signature appearance required display appearance cannot be obtained.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]pageHandle to a FSCRT_PAGE object which is a PDF page object.
[in]xHorizontal position in PDF page coordinate system.
[in]yVertical position in PDF page coordinate system.
[in]toleranceTolerance value for point, in PDF page coordinate system. Valid value: from 0.0f to 30.0f.
[out]sigPointer to a FSPDF_SIGNATURE handle that receives the specific signature object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter page or sig is NULL, or tolerance is invalid.
FSCRT_ERRCODE_INVALIDTYPE if parameter page is not a type of PDF page.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_NOTFOUND if there is no signature in the position.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if the signature cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • page: this handle is long-term partially recoverable.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetBitmap ( FSPDF_SIGNATURE  sig,
FSCRT_BITMAP *  bitmap 
)

Get the icon bitmap in signature visual display.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]bitmapPointer to a FSCRT_BITMAP handle that receives the icon bitmap.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or bitmap is NULL.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the icon bitmap in signature visual display cannot be obtained.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
  • bitmap: this handle is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetCert ( FSPDF_SIGNATURE  sig,
FS_INT32  index,
FSCRT_BSTR signedCert 
)

Get a signature certificate name from certificate chain.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]indexIndex number of certificates which starts from 0.
[out]signedCertPointer to a FSCRT_BSTR structure that receives the certificate.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or signedCert is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_NOTFOUND if parameter index exceeds the range of count of certificate in signature.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if a signature cert object in the chain cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
When sub filter of signature is adbe.x509.rsa_sha1, application needs to call this function to get verified public certificate before verifying signature. The first certificate in certificate chain is the signing certificate, and it can be get to verify the signature.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]contactInfoPointer to a FSCRT_BSTR structure that receives the contact information.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_PARAM if parameter sig or contactInfo is NULL.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if the contact information cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetDateTime ( FSPDF_SIGNATURE  sig,
FSCRT_DATETIMEZONE dt 
)

Get signing time of a signature(M entry in the dictionary).

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]dtPointer to a FSCRT_DATETIMEZONE structure that receives creation time.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or dt is NULL.
FSCRT_ERRCODE_NOTFOUND if signing time property cannot be found.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if creation time cannot be obtained of signer because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetDistinguishedName ( FSPDF_SIGNATURE  sig,
FSCRT_BSTR dn 
)

Get distinguished name of the signature owner.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]dnPointer to a FSCRT_BSTR structure that receives the distinguished name of signer.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig or dn is NULL.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if the signer cannot be obtained distinguished name.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetDoc ( FSPDF_SIGNATURE  sig,
FSCRT_DOCUMENT *  doc 
)

Retrieve the PDF document object related to a specific signature.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]docPointer to a FSCRT_DOCUMENT handle that receives a PDF document object.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter doc, or sig is NULL.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • doc: this handle is long-term partially recoverable.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]filterPointer to a FSCRT_BSTR structure that receives the name of the preferred signature handler to use.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or filter is NULL.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if the name of the preferred signature handler to use cannot be obtained when validating this signature because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetFlags ( FSPDF_SIGNATURE  sig,
FS_DWORD flags 
)

Get annotation flags of a signature.

A signature field is also a widget annotation. So a signature can have annotation flags.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]flagsPointer 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig or flags is NULL.
FSCRT_ERRCODE_ERROR if cannot get the current annotation flags of signature because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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".

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]locationPointer to a FSCRT_BSTR structure that receives the signing location.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig or location is NULL.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if location of signer cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetPageIndex ( FSPDF_SIGNATURE  sig,
FS_INT32 pageIndex 
)

Get the index of a PDF page containing the specified signature.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]pageIndexPointer to a FS_INT32 object that receives the index of a PDF page. Value -1 means error.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter pageIndex, or sig is NULL.
FSCRT_ERRCODE_ERROR if the page index cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetReason ( FSPDF_SIGNATURE  sig,
FSCRT_BSTR reason 
)

Get signing reason of a signature.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]reasonPointer to a FSCRT_BSTR structure that receives the signing reason.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig or reason is NULL.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if the signing reason cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetSigner ( FSPDF_SIGNATURE  sig,
FSCRT_BSTR signer 
)

Get signer name of a signature.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature.
[out]signerPointer to a FSCRT_BSTR structure that receives signer name.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or signer is NULL.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if the signer name cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetState ( FSPDF_SIGNATURE  sig,
FS_INT32 state 
)

Get current state of a signature.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]statePointer 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or state is NULL.
FSCRT_ERRCODE_ERROR if the signature state cannot be obtained because of any reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]subFilterPointer to a FSCRT_BSTR structure that receives a name that describes the encoding of the signature value and key information.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or subFilter is NULL.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if a name that describes the encoding of the signature value and key information in the signature dictionary cannot be obtained because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_GetText ( FSPDF_SIGNATURE  sig,
FSCRT_BSTR text 
)

Get the text content out of signature appearance.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]textPointer to a FSCRT_BSTR structure that receives the text content.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or text is NULL.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNRECOVERABLE if the function can not be recovered.
FSCRT_ERRCODE_ERROR if the text to be showed on signature appearance cannot be obtained.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sigis a NULL pointer.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if a signature field cannot be initiated because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_IsSigned ( FSPDF_SIGNATURE  sig,
FS_BOOL isSigned 
)

Determine whether a signature is signed or not.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]isSignedPointer to a FS_BOOL object that receives value indicatess if a signature is signed.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or isSigned is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the state that whether a signature field be signed cannot be determined because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]filterPointer to a FSCRT_BSTR structure to indicate filter of a third-party handler. Filter is the name of handler.
[in]subFilterPointer 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]sigHandlerPointer to a FSPDF_SIGNATUREHANDLER structure. It is a handler of custom signature.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter filter, or sigHandler is NULL.
FSCRT_ERRCODE_HANDLER if any callback function in parameter sigHandler is NULL.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if the handler cannot be registered to Foxit PDF SDK because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
If application wants to sign and verify signature, this function should be called first to register signature handler before signing and verifying.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_Remove ( FSPDF_SIGNATURE  sig)

Remove a signature.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig is NULL.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if a signature field cannot be removed because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
Remove the seal, and user still needs to call the Release interface to release the signature of Handle.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_ResetAppearance ( FSPDF_SIGNATURE  sig)

Reset the appearance of an unsigned signature field.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sigis a NULL pointer.
FSCRT_ERRCODE_UNKNOWNSTATE if parameter sig is not unsigned.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if appearance of a signature field cannot be reset appearance because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetAppearanceFlags ( FSPDF_SIGNATURE  sig,
FS_DWORD  apFlags 
)

Set signature appearance flags required for resetting appearance.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]apFlagsSignature appearance state. Please refer to macro definitions FSPDF_SIGNATURE_APPEARANCE_XXX and this can be one or combination of these macros
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the signature appearance required display appearance cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetBitmap ( FSPDF_SIGNATURE  sig,
FSCRT_BITMAP  bitmap 
)

Set a bitmap to icon in signature display.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]bitmapHandle 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or bitmap is NULL.
FSCRT_ERRCODE_UNSUPPORTED if parameter bitmap is FSCRT_BITMAPFORMAT_16BPP_RGB565 format, and FSCRT_BITMAPFORMAT_32BPP_RGBx.
FSCRT_ERRCODE_ERROR if fail to set a bitmap handle for signature visual displaying cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetCertChain ( FSPDF_SIGNATURE  sig,
const FSCRT_BSTR certChain,
FS_INT32  certCount 
)

Set a certificate chain into a signature dictionary.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]certChainPointer to a FSCRT_BSTR structure of array to specify the cert chain.
[in]certCountSize of certificate chain array.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or certChain is NULL, or certCount is less than or equal to 0.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the certificate signed by the chain cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
When the signature sub filter is adbe.x509.rsa_sha1,users need to call this interface to set the cert chain into Foxit PDF SDK.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]contactInfoPointer to a FSCRT_BSTR structure that specifies the contact information.
Returns
FSCRT_ERRCODE_SUCCESS if successful.
FSCRT_ERRCODE_INVALIDLICENSE if current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or contactInfo is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the contact information cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetDateTime ( FSPDF_SIGNATURE  sig,
const FSCRT_DATETIMEZONE dt 
)

Set the signing time of a signature(M entry in the dictionary).

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]dtPointer to a FSCRT_DATETIMEZONE structure that specifies the creation time of the signature.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or dt is NULL, or parameter dt is invalid.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the creation time of signer cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetDefaultContentsLength ( FSPDF_SIGNATURE  sig,
FS_DWORD  contentsLength 
)

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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]contentsLengthThe 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetDistinguishedName ( FSPDF_SIGNATURE  sig,
const FSCRT_BSTR dn 
)

Set distinguished name of signer in a signature dictionary.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]dnPointer to a FSCRT_BSTR structure that specifies the distinguished name of signer.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or dn is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the signer distinguished name cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]filterPointer to a FSCRT_BSTR structure to indicate the name of the preferred signature handler to use.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or filter is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the name of the preferred signature handler to use cannot be set when validating this signature because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetFlags ( FSPDF_SIGNATURE  sig,
FS_DWORD  flags 
)

Set annotation flags of a signature.

A signature field is also a widget annotation. So a signature can have annotation flags.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]flagsAnnotation 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig is NULL.
FSCRT_ERRCODE_ERROR if annotation flags of the current signature cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetIconProvider ( FSPDF_SIGNATUREICONPROVIDER iconProvider)

Set signature icon provider to Foxit PDF SDK.

Note
Signature icon provider provides methods to Foxit PDF SDK to extract state icon of signature and rendering mode of the icon when displaying state icon of signature.
Parameters
[in]iconProviderPointer to a FSPDF_SIGNATUREICONPROVIDER structure which is an custom signature icon provider handler.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_HANDLER if any callback function in parameter iconProvider is NULL.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is long-term recoverable.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetImage ( FSPDF_SIGNATURE  sig,
FSCRT_IMAGE  image 
)

Set an image to icon in signature display.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]imagePointer 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.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or image is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_UNSUPPORTED if the image type out of the supported type defined by macro definitions FSCRT_IMAGETYPE_XXXX.
FSCRT_ERRCODE_ERROR if fail to set an image object for signature visual displaying cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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".

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]locationPointer to a FSCRT_BSTR structure that specifies the signing location.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or location is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the location of signer cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetReason ( FSPDF_SIGNATURE  sig,
const FSCRT_BSTR reason 
)

Set signing reason of a signature.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]reasonPointer to a FSCRT_BSTR structure that specifies the signing reason.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or reason is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the signing reason cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetSigner ( FSPDF_SIGNATURE  sig,
const FSCRT_BSTR signer 
)

Set signer name of a signature.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature.
[in]signerPointer to a FSCRT_BSTR structure that specifies the signer name.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or signer is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the signer name cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]subFilterPointer to FSCRT_BSTR structure that specifies the name describing the encoding of the signature value and key information.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or subFilter is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the name that describes the encoding of the signature value and key information in the signature dictionary cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
FS_RESULT FSPDF_Signature_SetText ( FSPDF_SIGNATURE  sig,
const FSCRT_BSTR text 
)

Set the text content out of signature appearance.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]textPointer to a FSCRT_BSTR structure that specifies the text content.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or text is NULL.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_ERROR if the text to be showed on signature appearance cannot be set because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[in]savedFileHandle to a FSCRT_FILE object.
[out]signProgressPointer to a FSCRT_PRGRESS handle that receives the signing progressive progress handle.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_INVALIDLICENSE if the current license is not authorized or access to signature is not allowed.
FSCRT_ERRCODE_PARAM if parameter sig, or savedFile is NULL.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_UNKNOWNSTATE if parameter sig has been singed.
FSCRT_ERRCODE_UNKNOWNHANDLER if the signature signing handler is not registered.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if signing failed because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
The signature interface will trigger the callback to handler for custom signature processing, and save to saveFile. Application is suggested not to set true to the entry NeedAppearances of the dictionary AcroForm, or some compatibility problems with other software will happen.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
  • signProgress: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.
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.

Parameters
[in]sigHandle to a FSPDF_SIGNATURE object returned by function FSPDF_Doc_GetSignature or FSPDF_Signature_Add.
[out]verifyProgressPointer to a FSCRT_PROGRESS handle that receives the progressive handle.
Returns
FSCRT_ERRCODE_SUCCESS for success.
FSCRT_ERRCODE_PARAM if parameter sig, or verifyProgress is NULL.
FSCRT_ERRCODE_INVALIDMODULE if PDF module is not initialized.
FSCRT_ERRCODE_UNKNOWNSTATE if parameter sig has not been signed yet.
FSCRT_ERRCODE_UNKNOWNHANDLER if the signature signing handler is not registered.
FSCRT_ERRCODE_UNRECOVERABLE if function finds an unrecoverable error internally.
FSCRT_ERRCODE_OUTOFMEMORY if there is not enough memory or if the memory access is wrong.
FSCRT_ERRCODE_ERROR if a signature field cannot be verified because of any other reason.
For more error codes, please refer to macro definitions FSCRT_ERRCODE_XXX.
Note
The signature interface will trigger the callback custom authentication verification interface Handler.
Attention
Thread Safety: this function is thread safe.
OOM Information:
OOM handling is only for mobile platforms, not for server or desktop.
  • This function is short-term.
  • sig: this handle is short-term.
  • verifyProgress: this handle is short-term.
Please refer to the document "Robust PDF Applications with Limited Memory" for more details.

Foxit Corporation