FPDFSignature.h
1 #pragma once
2 
3 namespace Foxit
4 {
5  namespace PDF
6  {
7  ref class Signature;
8 
15  public enum class SigState
16  {
18  Unknown = 0,
20  Unsigned = 1,
22  Valid = 2,
24  Invalid = 3
25  };
26 
33  public enum class SigAppearanceFlags
34  {
36  FoxitFlag = 0x0001,
38  Label = 0x0002,
40  Reason = 0x0004,
42  CreationTime = 0x0008,
44  DistinguishName = 0x0010,
46  Location = 0x0020,
48  Signer = 0x0040,
50  Bitmap = 0x0080,
52  Text = 0x0100
53  };
54 
60  public ref class Signature sealed
61  {
62  public:
63 #ifdef _WIN10UWP_
64 
83  IAsyncOperation<Boolean>^ VerifyAsync(Pause^ pause);
84 
106  IAsyncOperation<Boolean>^ SignAsync(StorageFile^ saveFile, Pause^ pause);
107 #else
108 
127  Boolean Verify(Pause^ pause);
128 
151  Boolean Sign(Stream^ savefileStream, Pause^ pause);
152 #endif //_WIN10UWP_
153 
165  void ClearData();
166 
177  Boolean IsSigned();
178 
193  SigState GetState();
194 
209  Boolean ResetAppearanceStream();
210 
221  int32 GetPageIndex();
222 
234  String^ GetPreferredFilter();
235 
249  String^ GetPreferredSubFilter();
250 
264  void SetPreferredFilter(String^ filter);
265 
278  void SetPreferredSubFilter(String^ subfilter);
279 
292  uint32 GetAnnotFlags();
293 
308  void SetAnnotFlags(uint32 flags);
309 
322  uint32 GetAppearanceFlags();
323 
338  void SetAppearanceFlags(uint32 apFlags);
339 
351  String^ GetSigner();
352 
365  void SetSigner(String^ signer);
366 
378  DateTime^ GetSigningTime();
379 
393  String^ GetLocation();
394 
409  void SetLocation(String^ location);
410 
422  String^ GetReason();
423 
434  void SetReason(String^ reason);
435 
449  String^ GetContactInfo();
450 
465  void SetContactInfo(String^ contactInfo);
466 
478  String^ GetDistinguishedName();
479 
490  void SetDistinguishedName(String^ dn);
491 
503  String^ GetText();
504 
515  void SetText(String^ text);
516 
533  void SetBitmap(PixelSource^ pixelSource);
534 
548  int32 CountCerts();
549 
568  String^ GetCert(int32 index);
569 
587  void SetCertChain(const Array<String^>^ certChain);
588 
593  property int64 pointer;
594 
595  private:
596  Boolean VerifyImp(Pause^ pause);
597 #ifdef _WIN10UWP_
598  FS_RESULT SignImp(StorageFile^ inFile, Pause^ pause);
599 #else
600  FS_RESULT SignImp(Stream^ inFile, Pause^ pause);
601 #endif //_WIN10UWP_
602  };
603  }
604 }
If set, show signer on description.
SigState
Enumeration for signature states.
Definition: FPDFSignature.h:15
Class to represent date and time.
Definition: FSBase.h:292
If set, show bitmap on description.
If set, show location on description.
Class to represent DIB (Device Independent Bitmap) data created from Foxit PDF SDK.
Definition: FSBase.h:258
If set, show reason on description.
Signature state: unsigned.
Signature state: unknown.
Signature state: invalid.
(Reserved, not used currently)Class to represent pause control in progressive process.
Definition: FSBase.h:337
Class to represent PDF signature.
Definition: FPDFSignature.h:60
If set, show creation time on description.
Signature state: valid.
If set, show DN on description.
If set, show text on description.
SigAppearanceFlags
Enumeration for signature appearance flags.
Definition: FPDFSignature.h:33
Foxit namespace.
Definition: FPDFAnnot.h:3
If set, show lable on description.
If set, show Foxit flag on signature appearance.

Foxit Corporation