FPDFPage.h
1 #pragma once
2 
3 using namespace Foxit::PDF::Annotations;
4 
5 namespace Foxit
6 {
7  namespace PDF
8  {
9 #ifdef _WIN10UWP_
10 
16 #else
17 
23 #endif //_WIN10UWP_
24  public enum class RenderFlags
25  {
27  LCDText = 0x0001,
29  BGRStripe = 0x0002,
31  UseAntiAlias = 0x0004,
33  GrayScale = 0x0008,
35  NoNativeText = 0x0010,
37  TextGamma = 0x0020,
39  Annot = 0x0040,
48  DropObjects = 0x0080,
49  /* @brief Set if the form fields(widgets) are not to be rendered together. */
50  NoWidget = 0x0100,
56  NotTransformIcon = 0x0200,
62  LimitedImageCache = 0x0400,
64  NoSignature = 0x0800,
66  OCGPrint = 0x1000,
68  OCGDesign = 0x2000,
70  OCGExport = 0x4000,
72  QuickDraw = 0x8000
73  };
74 
75 #ifdef _WIN10UWP_
76 
83 #else
84 
91 #endif //_WIN10UWP_
92  public ref class Page sealed
93  {
94  public:
104  int32 GetIndex();
105 
115  Size GetSize();
116 
136  int32 GetRotation();
137 
157  RectF^ GetBox(PageBoxType boxType);
158 
187  Matrix^ GetDisplayMatrix(int32 x, int32 y, int32 width, int32 height, int32 rotation);
188 
199  void Close();
200 
219  TextPage^ LoadTextPage(uint32 option);
220 #ifdef _WIN10UWP_
221 
257  IAsyncOperation<IRandomAccessStreamWithContentType^>^ RenderPageAsync(PixelSource^ pxsrc, Matrix^ displayMatrix, uint32 renderFlags, Pause^ pause);
258 #endif //_WIN10UWP_
259 
278  int32 CountAnnots(const Array<AnnotType>^ typeFilter);
279 
306  IAnnot^ GetAnnot(const Array<AnnotType>^ typeFilter, int32 index);
307 
335  IAnnot^ GetAnnotAtPos(const Array<AnnotType>^ typeFilter, PointF^ position, float32 tolerance);
336 
362  int32 GetAnnotIndex(IAnnot^ annot, const Array<AnnotType>^ typeFilter);
363 
405  IAnnot^ AddAnnot(RectF^ rect, AnnotType annotType, const Array<AnnotType>^ typeFilter, int32 index);
406 
430  Boolean RemoveAnnot(IAnnot^ annot);
431 
452  void SetAnnotGroup(const Array<IMarkup^>^ annotArray, int32 headerIndex);
453 
471  Signature^ GetSignatureAtPos(PointF^ position, float32 tolerance);
472 
477  property int64 pointer;
478 
479  private:
480  //Render page to bitmap and get its data.
481  FS_RESULT GetRenderBitmapData(PixelSource^ pxsrc, Matrix^ displayMatrix, unsigned int renderFlags);
482  FS_RESULT GetBitmapData(FSCRT_BITMAP bmp, PixelSource^ dib);
483  FS_RESULT PDFPageToBitmap(FSCRT_PAGE page, int bmpWidth, int bmpHeight, Matrix^ displayMatrix, unsigned int renderFlags, FSCRT_BITMAP *renderBmp);
484 
485  //internal for UWP
486  public:
487 #ifdef _DOTNET_
488 
524 #endif // _DOTNET_
525  Boolean RenderPage(PixelSource^ pxsrc, Matrix^ displayMatrix, uint32 renderFlags, Pause^ pause);
526 
527  private:
528  IAnnot^ GetAnnotImp(bool bIsAtPos, const Array<AnnotType>^ typeFilter, int32 index, PointF^ position, float32 tolerance);
529 
530  Boolean m_bIsAnnotLoaded;
531  Boolean IsAnnotLoaded();
532  };
533 
534  }
535 }
Class to represent matrix used for transformation.
Definition: FSBase.h:175
Class to access PDF page.
Definition: FPDFPage.h:92
PDF page parsing flag for quick draw mode.
Drop page content objects while rendering page automatically.
Disable native text rendering feature (like GDI+, CGContext).
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
Interface class to define basic method of annotation.
Definition: FPDFAnnot.h:584
PageBoxType
Enumeration for page boundary box type.
Definition: FSBase.h:84
Set if device is using BGR LCD stripe. This flag is reserved currently.
Class to represent text page.
Definition: FPDFText.h:283
Enable gamma to support to display small characters.
This flag indicates not to render signatures.
Annotations namespace. Provide classes for accessing PDF annotation.
Definition: FPDFAnnot.h:13
(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 this flag is set, only apply those content objects which allow to output for exportation.
If this flag is set, only apply those content objects which allow to output to printer.
Use anti-aliasing to render graphics objects.
Set if it needs text rendering optimization for LCD display.
If this flag is set, only apply those content objects which allow to output for design mode...
Class to represent common annotation with basic annotation methods.
Definition: FPDFAnnot.h:1362
Set if no need to rotate or scale annotation icon.
Class to represent rectangle area(float) in device or page coordinate.
Definition: FSBase.h:121
AnnotType
Enumeration for annotation types.
Definition: FPDFAnnot.h:25
RenderFlags
Enumeration for rendering flags.
Definition: FPDFPage.h:24
Foxit namespace.
Definition: FPDFAnnot.h:3

Foxit Corporation