Foxit PDF SDK
foxit::pdf::PagingSealSignature Class Reference
Inheritance diagram for foxit::pdf::PagingSealSignature:
foxit::pdf::Signature foxit::pdf::interform::Field foxit::Base

Public Types

enum  PagingSealAPState {
  e_PagingSealAPStateUnknown = 0, e_PagingSealAPStateUnsigned = 1, e_PagingSealAPStateSigned = 2, e_PagingSealAPStateValid = 3,
  e_PagingSealAPStateInvalid = 4
}
 Enumeration for paging seal signature state to set appearance. More...
 
- Public Types inherited from foxit::pdf::Signature
enum  APFlags {
  e_APFlagFoxitFlag = 0x0001, e_APFlagLabel = 0x0002, e_APFlagReason = 0x0004, e_APFlagSigningTime = 0x0008,
  e_APFlagDN = 0x0010, e_APFlagLocation = 0x0020, e_APFlagSigner = 0x0040, e_APFlagBitmap = 0x0080,
  e_APFlagText = 0x0100, e_APFlagFoxitEditorFlag = 0x0200, e_APFlagProducer = 0x0400
}
 Enumeration for signature appearance flags. More...
 
enum  DigestAlgorithm { e_DigestSHA1 = 0, e_DigestSHA256 = 1, e_DigestSHA384 = 2, e_DigestSHA512 = 3 }
 Enumeration for signature digest algorithm. More...
 
enum  DocPermission { e_DocPermUnrestricted = 0, e_DocPermNoChangesAllowed = 1, e_DocPermFillingFormAndSigning = 2, e_DocPermFillingFormSigningAndAnnotating = 3 }
 Enumeration for signature document permission. More...
 
enum  FieldMDPAction { e_FieldMDPActionNone = 0, e_FieldMDPActionAll = 1, e_FieldMDPActionInclude = 2, e_FieldMDPActionExclude = 3 }
 Enumeration for signature FieldMDP("MDP" means modification detection and prevention) action type. More...
 
enum  KeyName {
  e_KeyNameSigner = 0, e_KeyNameLocation = 1, e_KeyNameReason = 2, e_KeyNameContactInfo = 3,
  e_KeyNameDN = 4, e_KeyNameText = 5, e_KeyNameProducer = 6
}
 Enumeration for signature key name. More...
 
enum  LabelName {
  e_LabelNameSigner = 0, e_LabelNameLocation = 1, e_LabelNameReason = 2, e_LabelNameSignTime = 3,
  e_LabelNameDN = 4, e_LabelNameProducer = 6
}
 Enumeration for signature label name. More...
 
enum  PAdESLevel {
  e_PAdESLevelNotPAdES = 0, e_PAdESLevelNone = 1, e_PAdESLevelBB = 2, e_PAdESLevelBT = 3,
  e_PAdESLevelBLT = 4, e_PAdESLevelBLTA = 5
}
 Enumeration for PAdES level. More...
 
enum  SignatureType { e_SignatureTypeOrdinary = 0, e_SignatureTypeTimeStamp = 3, e_SignatureTypePagingSeal = 4 }
 Enumeration for signature type. More...
 
enum  States {
  e_StateUnknown = 0x80000000, e_StateNoSignData = 0x00000200, e_StateUnsigned = 0x00000001, e_StateSigned = 0x00000002,
  e_StateVerifyValid = 0x00000004, e_StateVerifyInvalid = 0x00000008, e_StateVerifyErrorData = 0x00000010, e_StateVerifyNoSupportWay = 0x00000020,
  e_StateVerifyErrorByteRange = 0x00000040, e_StateVerifyChange = 0x00000080, e_StateVerifyIncredible = 0x00000100, e_StateVerifyNoChange = 0x00000400,
  e_StateVerifyIssueValid = 0x00001000, e_StateVerifyIssueUnknown = 0x00002000, e_StateVerifyIssueRevoke = 0x00004000, e_StateVerifyIssueExpire = 0x00008000,
  e_StateVerifyIssueUncheck = 0x00010000, e_StateVerifyIssueCurrent = 0x00020000, e_StateVerifyTimestampNone = 0x00040000, e_StateVerifyTimestampDoc = 0x00080000,
  e_StateVerifyTimestampValid = 0x00100000, e_StateVerifyTimestampInvalid = 0x00200000, e_StateVerifyTimestampExpire = 0x00400000, e_StateVerifyTimestampIssueUnknown = 0x00800000,
  e_StateVerifyTimestampIssueValid = 0x01000000, e_StateVerifyTimestampTimeBefore = 0x02000000, e_StateCertCannotGetVRI = 0x04000000, e_StateVerifyChangeLegal = 0x08000000,
  e_StateVerifyChangeIllegal = 0x10000000
}
 Enumeration for signature states. More...
 
- Public Types inherited from foxit::pdf::interform::Field
enum  Flags {
  e_FlagReadOnly = 0x01, e_FlagRequired = 0x02, e_FlagNoExport = 0x04, e_FlagButtonNoToggleToOff = 0x100,
  e_FlagButtonRadiosInUnison = 0x200, e_FlagTextMultiline = 0x100, e_FlagTextPassword = 0x200, e_FlagTextFileSelect = 0x400,
  e_FlagTextNoSpellCheck = 0x800, e_FlagTextDoNotScroll = 0x1000, e_FlagTextComb = 0x2000, e_FlagComboEdit = 0x100,
  e_FlagChoiceMultiSelect = 0x100, e_FlagTextRichText = 0x4000, e_FlagChoiceSort = 0x200, e_FlagChoiceCommitOnSelChange = 0x400
}
 Enumeration for form field flags. More...
 
enum  Type {
  e_TypeUnknown = 0, e_TypePushButton = 1, e_TypeCheckBox = 2, e_TypeRadioButton = 3,
  e_TypeComboBox = 4, e_TypeListBox = 5, e_TypeTextField = 6, e_TypeSignature = 7
}
 Enumeration for form field type. More...
 

Public Member Functions

 ~PagingSealSignature ()
 Destructor.
 
bool GenerateAppearance ()
 Generate the appearance of paging seal signature. More...
 
void SetAPStateBitmap (PagingSealAPState ap_state, const common::Bitmap &bitmap)
 Set a bitmap for the appearance of signature state. More...
 
void SetPagingSealConfig (PagingSealConfig paging_seal_config)
 Set the config of paging seal signature. More...
 
- Public Member Functions inherited from foxit::pdf::Signature
 Signature (const foxit::pdf::PDFDoc &document, foxit::pdf::objects::PDFDictionary *sig_field_dict)
 Constructor, from signature field dictionary. More...
 
 Signature (const interform::Field &field)
 Constructor, with parent class object. More...
 
 ~Signature ()
 Destructor.
 
bool ClearSignedData ()
 Clear the data and appearance if current signature is singed and verified valid. More...
 
void EnableEmbedFont (bool enable_embed_font)
 Enable or disable embed font. More...
 
void EnableIncrementalSaveForFirstSigning (bool enable_incremental_save)
 Enable or disable incremental save for first signing. User should call this function before calling function Signature::StartSign.
Default: false. More...
 
bool GenerateAppearance ()
 Generate the appearance of unsigned signature. More...
 
uint32 GetAppearanceFlags ()
 Get signature appearance flags. More...
 
common::Bitmap GetBitmap ()
 Get a bitmap which is used for the signature appearance. More...
 
bool GetByteRangeArray (uint32 out_byte_range_array[4])
 Get the byte ranges data, including 4 elements. More...
 
WString GetCert (int32 index) const
 Get a certificate from current signature's certificate chain by index. More...
 
int32 GetCertCount () const
 Get the count of certificates in current signature's certificate chain. More...
 
String GetCertificateInfo (const char *key)
 Get certificate information. More...
 
DocPermission GetDocPermission ()
 Get document permission for current signature. More...
 
PDFDoc GetDocument ()
 Get the PDF document, which current signature belongs to. More...
 
FieldMDPAction GetFieldMDPAction ()
 Get FieldMDP("MDP" means modification detection and prevention) action type. More...
 
WStringArray GetFieldMDPActionFields ()
 Get the field name array which is used for FieldMDP action. More...
 
String GetFilter ()
 Get filter. More...
 
WString GetKeyLabel (LabelName label_name)
 Get the string for specified key label. More...
 
WString GetKeyValue (KeyName key)
 Get the string value for specified key name. More...
 
PAdESLevel GetPAdESLevel ()
 Get PAdES level. More...
 
SignatureArray GetPagingSealGroupElements ()
 Get the group elements of current paging seal signature. More...
 
PagingSealSignature GetPagingSealSignature ()
 Get the paging seal signature. More...
 
objects::PDFDictionaryGetSignatureDict () const
 Get signature dictionary. More...
 
SignatureType GetSignatureType ()
 Get signature type. More...
 
PDFDoc GetSignedVersionDocument (const wchar_t *file_path)
 Get the PDF document in the signed version in which current signature was signed. More...
 
DateTime GetSignTime ()
 Get time of signing. More...
 
uint32 GetState ()
 Get current state. More...
 
String GetSubFilter ()
 Get sub filter. More...
 
bool IsEmpty () const
 Check whether current object is empty or not. More...
 
bool IsSigned ()
 Check whether current signature is signed or not. More...
 
bool IsTimeStamp ()
 Check if current signature is a time stamp signature. More...
 
void SetAppearanceContent (const String &appearance_content)
 Set customized appearance content (as low level drawing operation commands) for signed signature appearance. More...
 
void SetAppearanceFlags (uint32 appearance_flags)
 Set signature appearance flags. More...
 
void SetBitmap (const common::Bitmap &bitmap)
 Set a bitmap for the signature appearance. More...
 
void SetCertChain (const WStringArray &cert_chain)
 Set a certificate chain. More...
 
void SetCustomObject (const char *key, objects::PDFObject *pdf_object)
 Set custom PDF object for signature dictionary. More...
 
void SetDefaultContentsLength (uint32 default_length)
 Set the default length of signature contents which represents signature value (known as signed data). More...
 
void SetDocPermission (DocPermission permission)
 Set document permission for current signature. More...
 
void SetFieldMDPActionFields (const FieldMDPAction &action, const WStringArray &field_array)
 Set FieldMDP("MDP" means modification detection and prevention) action names array. More...
 
void SetFilter (const char *filter)
 Set filter. More...
 
void SetImage (const char *file_path, int frame_index)
 Set an image for the signature appearance, with a specified frame index. More...
 
void SetImage (const common::Image &image, int frame_index)
 Set an image for the signature appearance, with a specified frame index. More...
 
void SetImage (const wchar_t *file_path, int frame_index)
 Set an image for the signature appearance, with a specified frame index. More...
 
void SetKeyLabel (LabelName label_name, const wchar_t *label_value)
 Set the string for specified key label. More...
 
void SetKeyValue (KeyName key, const wchar_t *value)
 Set the string value for specified key name. More...
 
void SetSignTime (const DateTime &sign_time)
 Set time of signing. More...
 
void SetSubFilter (const char *sub_filter)
 Set sub filter. More...
 
common::Progressive StartSign (const wchar_t *cert_path, const foxit::WString &cert_password, foxit::pdf::Signature::DigestAlgorithm digest_algorithm, foxit::common::file::StreamCallback *stream_callback, const void *client_data=0, foxit::common::PauseCallback *pause=0)
 Start signing current signature if current signature is unsigned. More...
 
common::Progressive StartSign (const wchar_t *cert_path, const WString &cert_password, DigestAlgorithm digest_algorithm, const char *save_path, const void *client_data=0, common::PauseCallback *pause=0)
 Start signing current signature if current signature is unsigned. More...
 
common::Progressive StartSign (const wchar_t *cert_path, const WString &cert_password, DigestAlgorithm digest_algorithm, const wchar_t *save_path, const void *client_data=0, common::PauseCallback *pause=0)
 Start signing current signature if current signature is unsigned. More...
 
common::Progressive StartSign (foxit::common::file::StreamCallback *cert_file_stream, const foxit::WString &cert_password, foxit::pdf::Signature::DigestAlgorithm digest_algorithm, foxit::common::file::StreamCallback *stream_callback, const void *client_data=0, foxit::common::PauseCallback *pause=0)
 Start signing current signature if current signature is unsigned. More...
 
common::Progressive StartSign (foxit::common::file::StreamCallback *cert_file_stream, const WString &cert_password, DigestAlgorithm digest_algorithm, const char *save_path, const void *client_data=0, common::PauseCallback *pause=0)
 Start signing current signature if current signature is unsigned. More...
 
common::Progressive StartSign (foxit::common::file::StreamCallback *cert_file_stream, const WString &cert_password, DigestAlgorithm digest_algorithm, const wchar_t *save_path, const void *client_data=0, common::PauseCallback *pause=0)
 Start signing current signature if current signature is unsigned. More...
 
common::Progressive StartVerify (const void *client_data=0, common::PauseCallback *pause=0)
 Start verifying the intergrity of current signature if current signature is signed. More...
 
- Public Member Functions inherited from foxit::pdf::interform::Field
 Field (const Field &field)
 Constructor, with another form field object. More...
 
 Field (const PDFDoc &document, objects::PDFDictionary *field_dict)
 Constructor, from field dictionary. More...
 
 ~Field ()
 Destructor.
 
common::Alignment GetAlignment () const
 Get the alignment value. More...
 
WString GetAlternateName () const
 Get alternate name. More...
 
Control GetControl (const foxit::pdf::PDFPage &page, int index)
 Get a form control by index, in a specified PDF page. More...
 
Control GetControl (int index)
 Get a form control by index. More...
 
int GetControlCount () const
 Get count of form controls. More...
 
int GetControlCount (const foxit::pdf::PDFPage &page) const
 Get count of form controls in a specified PDF page. More...
 
DefaultAppearance GetDefaultAppearance () const
 Get the default appearance data. More...
 
WString GetDefaultValue () const
 Get default value. More...
 
objects::PDFObjectGetDefaultValueObj () const
 Get the PDF object of field's default value. More...
 
objects::PDFDictionaryGetDict () const
 Get the PDF dictionary of current object. More...
 
uint32 GetFlags () const
 Get field flags. More...
 
objects::PDFObjectGetInheritedAttribute (const char *attribute_name) const
 Get the PDF object for specified attribute which may be inherited from the ancestor node in the field tree. More...
 
WString GetMappingName () const
 Get mapping name. More...
 
int GetMaxLength () const
 Get maximum length of the field's text, in characters. More...
 
WString GetName () const
 Get field name. More...
 
ChoiceOptionArray GetOptions () const
 Get options of list box or combo box. More...
 
int GetTopVisibleIndex ()
 Get top index of option for scrollable list boxes. More...
 
Type GetType () const
 Get field type. More...
 
WString GetValue () const
 Get value. More...
 
objects::PDFObjectGetValueObj () const
 Get the PDF object of field's value. More...
 
bool IsEmpty () const
 Check whether current object is empty or not. More...
 
bool operator!= (const Field &other) const
 Not equal operator. More...
 
Fieldoperator= (const Field &other)
 Assign operator. More...
 
bool operator== (const Field &other) const
 Equal operator. More...
 
bool Reset ()
 Reset data in current field to its default value. (Not support signature field) More...
 
void SetAlignment (common::Alignment alignment)
 Set alignment property of a form, as a document-wide default value. (Not support signature field) More...
 
void SetAlternateName (const wchar_t *alternate_name)
 Set alternate name. (Not support signature field) More...
 
void SetDefaultAppearance (const DefaultAppearance &default_ap)
 Set default appearance data. More...
 
void SetDefaultValue (const wchar_t *value)
 Set default value. More...
 
void SetFlags (uint32 flags)
 Set field flags. More...
 
void SetMappingName (const wchar_t *name)
 Set mapping name. (Not support signature field) More...
 
void SetMaxLength (int max_length)
 Set maximum length of the field's text, in characters. More...
 
void SetOptions (const ChoiceOptionArray &option_array)
 Set options of list box or combo box. More...
 
void SetTopVisibleIndex (int index)
 Set top index for scrollable list boxes. More...
 
void SetValue (const wchar_t *value)
 Set value. More...
 
- Public Member Functions inherited from foxit::Base
FS_HANDLE Handle () const
 Get the handle of current object. More...
 

Detailed Description

This class represents a paging seal signature object for signing the signatures. It is a type of signature field, so class PagingSealSignature is derived from class pdf::Signature. A new paging seal signature object would be returned by function PDFDoc::AddPagingSealSignature, instead of PDFPage::AddSignature.
A paging seal signature contains a few signatures or a few paging seal annotation. To set the configuration of paging seal signature, please use the function PagingSealSignature::SetPagingSealConfig.

Member Enumeration Documentation

◆ PagingSealAPState

Enumeration for paging seal signature state to set appearance.

Values of this enumeration should be used alone.

Enumerator
e_PagingSealAPStateUnknown 

Unknown signature.

e_PagingSealAPStateUnsigned 

Unsigned signature.

e_PagingSealAPStateSigned 

Signed signature.

e_PagingSealAPStateValid 

Verification state of a signature is valid.

e_PagingSealAPStateInvalid 

Verification state of a signature is invalid.

Member Function Documentation

◆ GenerateAppearance()

bool foxit::pdf::PagingSealSignature::GenerateAppearance ( )

Generate the appearance of paging seal signature.

This function should be called before signing and the paging seal config should be set already. If this function is not called, the page will not display the paging seal signatures.

Returns
true means success, while false means failure.

◆ SetAPStateBitmap()

void foxit::pdf::PagingSealSignature::SetAPStateBitmap ( PagingSealAPState  ap_state,
const common::Bitmap bitmap 
)

Set a bitmap for the appearance of signature state.

If user wants the setting by this function has effect on paging seal signatures' appearance, please call function PagingSealSignature::GenerateAppearence after this function.

Parameters
[in]ap_stateThe state of signature.
[in]bitmapA bitmap to be set to the appearance.
Returns
None.

◆ SetPagingSealConfig()

void foxit::pdf::PagingSealSignature::SetPagingSealConfig ( PagingSealConfig  paging_seal_config)

Set the config of paging seal signature.

Parameters
[in]paging_seal_configA paging seal configuration to be set.
Returns
None.