FPDFDocument.h
1 #pragma once
2 
3 namespace Foxit
4 {
5  namespace PDF
6  {
7 
8 #ifdef _WIN10UWP_
9 
15 #else
16 
22 #endif //_WIN10UWP_
23  public enum class PageLoadFlags
24  {
26  Normal = 0x00,
28  TextOnly = 0x01,
34  Annot = 0x02,
35  };
36 
43  public ref class PageInfo sealed
44  {
45  public:
48  {
49  Size = FS_SIZE(0.0f, 0.0f);
50  Rotation = -1;
51  }
52 
54  PageInfo(Size size, int32 rotation)
55  {
56  Size = size;
57  Rotation = rotation;
58  }
59 
61  property Size Size;
71  property int32 Rotation;
72  };
73 
74 #ifdef _WIN10UWP_
75 
82 #else
83 
90 #endif //_WIN10UWP_
91  public ref class Document sealed
92  {
93  public:
94 #ifdef _WIN10UWP_
95 
128  IAsyncOperation<Boolean>^ LoadAsync(StorageFile^ storageFile, String^ password, uint32 loadFlag);
129 
163  IAsyncOperation<Boolean>^ LoadFromStreamAsync(IRandomAccessStream^ stream, String^ password, uint32 loadFlag);
164 
187  IAsyncOperation<Boolean>^ SaveAsAsync(StorageFile^ storageFile, uint32 saveFlags, Pause^ pause);
188 #else
189 
223  Boolean Load(Stream^ stream, String^ password, uint32 loadFlag);
224 
248  Boolean SaveAs(Stream^ stream, uint32 saveFlags, Pause^ pause);
249 #endif // _WIN10UWP_
250 
260  void Close();
261 
272  int32 CountPages();
273 
288  PageInfo^ GetPageInfo(int32 index);
289 #ifdef _WIN10UWP_
290 
315  IAsyncOperation<Page^>^ LoadPageAsync(int32 index, uint32 loadFlag, Pause^ pause);
316 #endif //_WIN10UWP_
317 
330  Bookmark^ GetBookmarkRoot();
331 
355  Bookmark^ FindBookmark(Bookmark^ startBookmark, String^ title, uint32 flags);
356 
367  int32 CountAttachment();
368 
382  Attachment^ GetAttachment(int32 index);
383 
384 #ifdef _WIN10UWP_
385 
400  Attachment^ CreateAttachment(StorageFile^ storageFile, int32 index, Boolean isEmbedded);
401 #else
402 
417  Attachment^ CreateAttachment(FileInfo^ fileInfo, int32 index, Boolean isEmbedded);
418 #endif //_WIN10UWP_
419 
433  Boolean RemoveAttachment(Attachment^ attachment);
434 
446  int32 CountSignatures();
447 
463  Signature^ GetSignature(int32 index);
464 
485  Signature^ AddSignature(Page^ page, RectF^ rectangle, uint32 contentsLength);
486 
502  Boolean RemoveSignature(Signature^ signature);
503 
508  property int64 pointer;
509 
510  private:
511  FSCRT_FILE m_file;
512  FSPDF_ATTACHMENTS m_attachments;
513  Page^ LoadPageImp(int32 index, uint32 loadFlag, Pause^ pause);
514 #ifdef _WIN10UWP_
515  FS_RESULT LoadCommon(IDataReader^ fileread, String^ password, uint32 loadFlag);
516  Boolean Load(StorageFile^ storageFile, String^ password, uint32 loadFlag);
517  Boolean LoadFromStream(IRandomAccessStream^ stream, String^ password, uint32 loadFlag);
518  FS_RESULT SaveAsImp(StorageFile^ storageFile, uint32 saveFlags);
519 
520  Attachment^ CreateAttachmentImp(StorageFile^ inputFile, int32 index, Boolean isEmbedded);
521 #else
522  Attachment^ CreateAttachmentImp(FileInfo^ inputFile, int32 index, Boolean isEmbedded);
523 #endif //_WIN10UWP_
524  //internal for UWP
525  public:
526 #ifdef _DOTNET_
527 
547 #endif //_DOTNET_
548  Boolean SaveToFile(String ^ filePath, uint32 saveFlags, Pause^ pause);
549 
550 #ifdef _DOTNET_
551 
579 #endif //_DOTNET_
580  Boolean LoadFromFilePath(String ^ filePath, String^ password, uint32 loadFlag);
581 
582 #ifdef _DOTNET_
583 
608 #endif // _DOTNET_
609  Page^ LoadPage(int32 index, uint32 loadFlag, Pause^ pause);
610  };
611 
612  }
613 }
If set, annotations will be loading during page loading process.
Class to access PDF document.
Definition: FPDFDocument.h:91
Class to access PDF page.
Definition: FPDFPage.h:92
Class to represent page information.
Definition: FPDFDocument.h:43
PageInfo(Size size, int32 rotation)
Constructor to initialize a new instance of class PDF::PageInfo with specific values.
Definition: FPDFDocument.h:54
PageLoadFlags
Enumeration for page loading flags.
Definition: FPDFDocument.h:23
PageInfo()
Default constructor.
Definition: FPDFDocument.h:47
Parse page in normal mode during page loading process.
Class to access a PDF bookmark.
Definition: FPDFBookmark.h:42
(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
Class to represent PDF attachment.
Definition: FPDFBase.h:335
Class to represent rectangle area(float) in device or page coordinate.
Definition: FSBase.h:121
Parse page for text-only mode during page loading process.
Foxit namespace.
Definition: FPDFAnnot.h:3

Foxit Corporation