FSBase.h
1 #pragma once
2 
4 namespace Foxit
5 {
6  namespace PDF
7  {
8  ref class Page;
9  ref class Signature;
10 
11  namespace Annotations
12  {
13  ref class AnnotIconProvider;
14  }
15  }
16 
23  public enum class ErrorCode
24  {
26  Success = 0,
28  Error = -1,
30  InvalidLibrary = -2,
32  InvalidModule = -3,
34  OutOfMemory = -5,
36  Password = -6,
38  Format = -7,
40  File = -8,
42  Param = -9,
44  InvalidLicense = -10,
46  Handler = -11,
50  InvalidCertificate = -13,
52  NotFound = -14,
54  InvalidType = -15,
56  Unsupported = -16,
58  NotParsed = -17,
60  UnknownState = -18,
62  BufferOverflow = -19,
64  Conflict = -20,
66  DataNotReady = -21,
68  UnknownHandler = -23,
70  ExpiredLicense = -24,
71 
73  InvaildHandle = 9999
74  };
75 
84  public enum class PageBoxType
85  {
91  MediaBox = 0,
97  CropBox = 1,
103  TrimBox = 2,
109  ArtBox = 3,
115  BleedBox = 4
116  };
117 
121  public ref class RectF sealed
122  {
123  public:
126  {
127  Left = 0.0f;
128  Top = 0.0f;
129  Right = 0.0f;
130  Bottom = 0.0f;
131  }
133  RectF(float32 left, float32 top, float32 right, float32 bottom)
134  {
135  Left = left;
136  Top = top;
137  Right = right;
138  Bottom = bottom;
139  }
140 
142  property float32 Left;
144  property float32 Top;
146  property float32 Right;
148  property float32 Bottom;
149  };
150 
154  public ref class PointF sealed
155  {
156  public:
158  PointF() { X = 0.0f; Y = 0.0f; }
160  PointF(float32 x, float32 y) { X = x; Y = y; }
161 
163  property float32 X;
165  property float32 Y;
166  };
167 
175  public ref class Matrix sealed
176  {
177  public:
180  {
181  A = 1.0f;
182  B = 0.0f;
183  C = 0.0f;
184  D = 1.0f;
185  E = 0.0f;
186  F = 0.0f;
187  }
189  Matrix(float32 a, float32 b, float32 c, float32 d, float32 e, float32 f)
190  {
191  A = a;
192  B = b;
193  C = c;
194  D = d;
195  E = e;
196  F = f;
197  }
198 
209  Matrix^ GetReverse();
210 
224  PointF^ TransformPointF(PointF^ pointF);
225 
239  RectF^ TransformRectF(RectF^ rectF);
240 
242  property float32 A;
244  property float32 B;
246  property float32 C;
248  property float32 D;
250  property float32 E;
252  property float32 F;
253  };
254 
258  public ref class PixelSource sealed
259  {
260  public:
263 
264 #ifdef _DOTNET_
265 
271 #else
272 
277 #endif
278  property BitmapPixelFormat Format;
279 
281  property IBuffer^ PixelBuffer;
282 
284  property int32 Width;
286  property int32 Height;
287  };
288 
292  public ref class DateTime sealed
293  {
294  public:
296  DateTime(uint16 year, uint16 month, uint16 day, uint16 hour, uint16 minute, uint16 second,
297  uint16 milliseconds, int16 tzHour, uint16 tzMinute);
298 
300  property uint16 Year;
302  property uint16 Month;
304  property uint16 Day;
306  property uint16 Hour;
308  property uint16 Minute;
310  property uint16 Second;
312  property uint16 Milliseconds;
317  property int16 TzHour;
319  property uint16 TzMinute;
320  };
321 
332  public delegate Boolean NeedPauseNowDelegate(Object^ clientData);
333 
337  public ref class Pause sealed
338  {
339  public:
341  Pause() { ClientData = nullptr, NeedPauseNowFunc = nullptr; }
342 
348  property Object^ ClientData;
349 
354  property NeedPauseNowDelegate^ NeedPauseNowFunc;
355  };
356 
357 
376  public delegate Object^ StartCalcDigestDelegate(Object^ clientData, Foxit::PDF::Signature^ sig, IBuffer^ fileBuffer, const Array<uint32>^ byteRangeArray);
377 
388  public delegate int32 ContinueCalcDigestDelegate(Object^ clientData, Object^ context, Pause^ pause);
389 
398  public delegate IBuffer^ FinishCalcDigestDelegate(Object^ clientData, Object^ context);
399 
412  public delegate IBuffer^ SignDelegate(Object^ clientData, Object^ context, Foxit::PDF::Signature^ sig, IBuffer^ digest);
413 
427  public delegate Boolean VerifyDelegate(Object^ clientData, Object^ context, Foxit::PDF::Signature^ sig, IBuffer^ digest, IBuffer^ signedData);
428 
436  public ref class SignatureHandler sealed
437  {
438  public:
441  {
442  ClientData = nullptr;
443  StartCalcDigestFunc = nullptr;
444  ContinueCalcDigestFunc = nullptr;
445  FinishCalcDigestFunc = nullptr;
446  SignFunc = nullptr;
447  VerifyFunc = nullptr;
448  }
449 
455  property Object^ ClientData;
456 
460  property StartCalcDigestDelegate^ StartCalcDigestFunc;
461 
465  property ContinueCalcDigestDelegate^ ContinueCalcDigestFunc;
466 
470  property FinishCalcDigestDelegate^ FinishCalcDigestFunc;
471 
475  property SignDelegate^ SignFunc;
476 
480  property VerifyDelegate^ VerifyFunc;
481  };
482 
489  public ref class Library sealed
490  {
491  public:
499  static ErrorCode GetLastError();
500 
519  static Boolean Load(String^ licenseKey, String^ unlockCode);
520 
534  static void Unload();
535 
548  static void LoadSystemFonts();
549 
579  static void SetAnnotIconProvider(Foxit::PDF::Annotations::AnnotIconProvider^ iconProvider);
580 
602  static Boolean RegisterSignatureHandler(String^ filter, String^ subfilter, SignatureHandler^ sigHandler);
603  };
604 
612  public enum class PathPointType
613  {
620  CloseFigure = 0x0001,
621 
627  LineTo = 0x0002,
628 
634  BezierTo = 0x0004,
635 
641  MoveTo = 0x0006
642  };
643 
653  public ref class PathPoint sealed
654  {
655  public:
657  PathPoint(uint32 type, const Array<PointF^>^ points);
658 
664  property uint32 Type;
665 
675  property Array<PointF^>^ Points;
676  };
677 
681  public ref class PDFPath sealed
682  {
683  public:
695  static PDFPath^ Create();
696 
706  Boolean Release();
707 
717  void Clear();
718 
729  int32 CountPathPoints();
730 
746  PathPoint^ GetPathPoint(int32 index);
747 
761  Boolean AddPathPoint(PathPoint^ pathPoint);
762 
776  Boolean RemovePathPoint(int32 index);
777 
782  property int64 pointer;
783  };
784 
791  public enum class FontStyles
792  {
794  FixedPitch = 0x0001,
796  Serif = 0x0002,
798  Symbolic = 0x0004,
800  Script = 0x0008,
802  NonSymbolic = 0x0020,
804  Italic = 0x0040,
806  AllCap = 0x10000,
808  SmallCap = 0x20000,
810  Bold = 0x40000,
811  };
812 
819  public enum class StandardFontID
820  {
822  Courier = 0,
824  CourierB = 1,
826  CourierBI = 2,
828  CourierI = 3,
830  Helvetica = 4,
832  HelveticaB = 5,
834  HelveticaBI = 6,
836  HelveticaI = 7,
838  Times = 8,
840  TimesB = 9,
842  TimesBI = 10,
844  TimesI = 11,
846  Symbol = 12,
848  ZapfDingbats = 13,
849  };
850 
857  public enum class FontCharset
858  {
860  ANSI = 0,
862  Default = 1,
864  Symbol = 2,
866  Shift_JIS = 128,
868  Hangeul = 129,
870  GB2312 = 134,
872  ChineseBig5 = 136,
874  Thai = 222,
876  EastEurope = 238,
878  Russian = 204,
880  Greek = 161,
882  Turkish = 162,
884  Hebrew = 177,
886  Arabic = 178,
888  Baltic = 186
889  };
890 
894  public ref class Font sealed
895  {
896  public:
915  static Font^ Create(String^ fontName, uint32 fontStyles, int32 weight, FontCharset charset);
916 
932  static Font^ CreateStandard(StandardFontID fontID);
933 
945  String^ GetName();
946 
957  Boolean Release();
958 
963  property int64 pointer;
964  };
965 }
Font charset: Traditional Chinese.
Class to represent matrix used for transformation.
Definition: FSBase.h:175
RectF()
Default constructor.
Definition: FSBase.h:125
RectF(float left, float top, float right, float bottom)
Constructor to initialize a new instance of class Foxit::RectF with specific values.
Definition: FSBase.h:133
Standard font: Times-Italic.
Font style: non-symbolic.
Font charset: Baltic.
Standard font: Helvetica.
SignatureHandler()
Default constructor.
Definition: FSBase.h:440
Standard font: Times-Bold.
Matrix()
Default constructor.
Definition: FSBase.h:179
ErrorCode
Enumeration for error code.
Definition: FSBase.h:23
Class to represent date and time.
Definition: FSBase.h:292
Incorrect password.
Standard font: Times-BoldItalic.
Contents are not parsed.
License authorization error: current license is not authorized or has no right to access some module...
State is error or unknown.
Invalid module or module uninitialized.
Specify that a figure is automatically closed after the corresponding line or curve is drawn...
Matrix(float a, float b, float c, float d, float e, float f)
Constructor to initialize a new instance of class Foxit::Matrix with specific values.
Definition: FSBase.h:189
Class to represent annotation icon provider.
Definition: FPDFAnnot.h:434
Class to represent a path point.
Definition: FSBase.h:653
Data cannot be found.
Font charset: System default, for unknown or mapping purpose.
Standard font: Courier-BoldOblique, Bold italic.
Data format error.
Font charset: ANSI (United States, Western Europe).
Unknown handler or cannot find availably one.
Class to represent point(float) in device or page coordinate.
Definition: FSBase.h:154
Class to represent DIB (Device Independent Bitmap) data created from Foxit PDF SDK.
Definition: FSBase.h:258
Font charset: Japanese (Shift-JIS).
Out of memory since there is no enough memory or the memory access is wrong.
Standard font: Helvetica-BoldOblique, Bold italic.
Standard font: Courier.
Pause()
Default constructor.
Definition: FSBase.h:341
Class to represent a font object.
Definition: FSBase.h:894
Trim box for page boundary.
Font charset: Arabic.
Font style: force bold.
Standard font: Courier-Oblique, Italic.
PathPointType
Enumeration for types of path point.
Definition: FSBase.h:612
PixelSource()
Default constructor.
Definition: FSBase.h:262
PageBoxType
Enumeration for page boundary box type.
Definition: FSBase.h:84
Standard font: Times-Roman.
public delegate array< unsigned char >^ SignDelegate(Object^ clientData, Object^ context, Foxit::PDF::Signature^ sig, array< unsigned char >^digest)
A delegate function to sign a specified signature.
Specifies that this point is a control point or ending point for a Bezier spline. ...
Font style: script.
Font charset: Eastern European.
Bleed box for page boundary.
FontCharset
Enumeration for font charsets.
Definition: FSBase.h:857
public delegate array< unsigned char >^ FinishCalcDigestDelegate(Object^ clientData, Object^ context)
A delegate function to finish the custom digest calculation and get the digest.
Crop box for page boundary.
Parameter error.
public delegate Boolean NeedPauseNowDelegate(Object^ clientData)
(Reserved, not used currently)A delegate function to indicate whether specific process needs to be pa...
Media box for page boundary.
public delegate Int32 ContinueCalcDigestDelegate(Object^ clientData, Object^ context, Pause^ pause)
A delegate function to continue a custom digest calculation.
Font style: fixed pitch.
Standard font: Helvetica-Oblique, Italic.
Font style: symbolic.
Class to represent a PDF path.
Definition: FSBase.h:681
(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
FontStyles
Enumeration for font styles.
Definition: FSBase.h:791
Class to represent signature handler.
Definition: FSBase.h:436
Font charset: Korean (Wansung).
File access error, cannot read or write file data.
Standard font: Courier-Bold.
Font style: serif.
Standard font: Symbol.
PointF()
Default constructor.
Definition: FSBase.h:158
Current object handle is invalid.
Font charset: Simplified Chinese.
Font style: all cap.
StandardFontID
Enumeration for standard font IDs.
Definition: FSBase.h:819
Class to represent the library management.
Definition: FSBase.h:489
Buffer is overflow, need more space.
Specify that a line is to be drawn from the current position to this point, which becomes a new curre...
Callback functions in handler are error.
Font charset: Thai.
Font charset: Russian.
Font charset: Hebrew.
public delegate Object^ StartCalcDigestDelegate(Object^ clientData, Foxit::PDF::Signature^ sig, array< unsigned char >^fileBuffer, const List< UInt32 >^byteRangeArray)
A delegate function to start a custom digest calculation.
PointF(float x, float y)
Constructor to initialize a new instance of class Foxit::PointF with specific values.
Definition: FSBase.h:160
Class to represent rectangle area(float) in device or page coordinate.
Definition: FSBase.h:121
Data or values conflict.
Incorrect certificate or its data error.
Invalid object type.
Standard font: ZapfDingbats.
Specify that this point starts a figure. This point becomes a new current position.
Font charset: Greek.
Foxit namespace.
Definition: FPDFAnnot.h:3
Art box for page boundary.
Font charset: Turkish.
Standard font: Helvetica-Bold.
Unknown security handler or cannot find availably one.
Invalid Foxit PDF SDK manager.
Font style: italic.
Font style: small cap.
Common error for any kind.
public delegate Boolean VerifyDelegate(Object^ clientData, Object^ context, Foxit::PDF::Signature^ sig, array< unsigned char >^digest, array< unsigned char >^signedData)
A delegate function to verify a specified signature.

Foxit Corporation