fs_pdfdoc.h
Go to the documentation of this file.
1 
15 #ifndef FS_PDFDOC_H_
16 #define FS_PDFDOC_H_
17 
18 #include "common/fs_common.h"
19 #include "common/file/fs_file.h"
20 #include "pdf/fs_bookmark.h"
21 #include "pdf/fs_pdfpage.h"
22 #include "pdf/fs_readingbookmark.h"
24 
30 namespace foxit {
31 namespace fdf {
32 class FDFDoc;
33 } // namespace fdf
34 namespace pdf {
35 // forward declaration
36 namespace actions {
37 class Action;
38 } // namespace actions
39 namespace interform {
40 class Form;
41 } // namespace interform;
42 class ReadingBookmark;
43 class SecurityHandler;
44 class Signature;
45 class StdEncryptData;
46 class CertificateEncryptData;
47 class DRMEncryptData;
48 class CustomEncryptData;
49 class RMSEncryptData;
50 
52 class WrapperData FS_FINAL : public Object {
53  public:
56  : version(0) {}
57 
67  WrapperData(int version, const wchar_t* type, const wchar_t* app_id, const wchar_t* uri, const wchar_t* description)
68  : version(version)
69  , type(type)
70  , app_id(app_id)
71  , uri(uri)
73 
79  WrapperData(const WrapperData& wrapper_data)
80  : version(wrapper_data.version)
81  , type(wrapper_data.type)
82  , app_id(wrapper_data.app_id)
83  , uri(wrapper_data.uri)
84  , description(wrapper_data.description) {}
85 
93  WrapperData& operator = (const WrapperData& wrapper_data) {
94  version = wrapper_data.version;
95  type = wrapper_data.type;
96  app_id = wrapper_data.app_id;
97  uri = wrapper_data.uri;
98  description = wrapper_data.description;
99  return *this;
100  }
101 
113  void Set(int version, const wchar_t* type, const wchar_t* app_id, const wchar_t* uri, const wchar_t* description) {
114  this->version = version;
115  this->type = type;
116  this->app_id = app_id;
117  this->uri = uri;
118  this->description = description;
119  }
120 
122  int version;
131 };
132 
134 class PayLoadData FS_FINAL {
135  public:
138  : version(0.0f)
139  , file_size (0){}
140 
150  PayLoadData(float version, const wchar_t* crypto_filter, const wchar_t* file_name, foxit::int64 file_size, const wchar_t* description)
151  : version(version)
156  {}
157 
163  PayLoadData(const PayLoadData& payload_data)
164  : version(payload_data.version)
165  , crypto_filter(payload_data.crypto_filter)
166  , description(payload_data.description)
167  , file_name(payload_data.file_name)
168  , file_size(payload_data.file_size){}
169 
177  PayLoadData& operator=(const PayLoadData& payload_data) {
178  version = payload_data.version;
179  crypto_filter = payload_data.crypto_filter;
180  description = payload_data.description;
181  file_name = payload_data.file_name;
182  file_size = payload_data.file_size;
183  return *this;
184  }
185 
195  void Set(float version, const wchar_t* crypto_filter, const wchar_t* file_name, int64 file_size, const wchar_t* description) {
196  this->version = version;
197  this->crypto_filter = crypto_filter;
198  this->file_name = file_name;
199  this->file_size = file_size;
200  this->description = description;
201  }
202 
204  float version;
213 };
214 
219 class PageBasicInfo FS_FINAL : public Object {
220  public:
230  : width(width)
231  , height(height)
232  , rotation(rotation) {}
233 
236  : width(0)
237  , height(0)
238  , rotation(CommonDefines::e_RotationUnknown) {}
244  PageBasicInfo(const PageBasicInfo& page_info)
245  : width(page_info.width)
246  , height(page_info.height)
247  , rotation(page_info.rotation) {}
256  width = page_info.width;
257  height = page_info.height;
258  rotation = page_info.rotation;
259  return *this;
260  }
271  void Set(float width, float height, common::Rotation rotation) {
272  this->width = width;
273  this->height = height;
274  this->rotation = rotation;
275  }
276 
278  float width;
280  float height;
286 };
287 
338 class PDFDoc FS_FINAL : public Base {
339  public:
345  typedef enum _PasswordType {
354  } PasswordType;
355 
361  typedef enum _EncryptType {
378  } EncryptType;
379 
385  typedef enum _UserPermissions {
392  e_PermPrint = 0x0004,
399  e_PermModify = 0x0008,
407  e_PermExtract = 0x0010,
414  e_PermAnnotForm = 0x0020,
421  e_PermFillForm = 0x0100,
436  e_PermAssemble = 0x0400,
444  } UserPermissions;
445 
451  typedef enum _SaveFlags {
484  } SaveFlags;
485 
491  typedef enum _ImportPageFlags {
503  } ImportPageFlags;
504 
510  typedef enum _DisplayMode {
526  } DisplayMode;
527 
534  typedef enum _DataType {
536  e_Forms = 0x0001,
538  e_Annots = 0x0002,
540  e_NoLinks = 0x0004
541  } DataType;
542 
548  typedef enum _WrapperType {
555  } WrapperType;
556 
557 
564  PDFDoc();
565 
574  explicit PDFDoc(const char* path);
575 
584  explicit PDFDoc(const wchar_t* path);
585 
596  explicit PDFDoc(const void* buffer, size_t size);
597 
612  explicit PDFDoc(common::file::ReaderCallback* file_read, bool is_async = false);
624  explicit PDFDoc(std::ifstream* input_file_stream);
625 
626  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
627  explicit PDFDoc(FS_HANDLE handle);
629  ~PDFDoc();
630 
632  PDFDoc(const PDFDoc&);
633 
641  PDFDoc& operator = (const PDFDoc& other);
649  bool operator == (const PDFDoc& other) const;
650 
658  bool operator != (const PDFDoc& other) const;
659 
667  bool IsEmpty() const;
668 
675 
695  bool IsLinearized() const;
696 
703  bool IsTaggedPDF() const;
704 
726  ErrorCode Load(const String& password = "");
727 
750  ErrorCode LoadW(const WString& password = WString());
751 
783  common::Progressive StartLoad(const String& password = "", bool is_cache_stream = true,
784  common::PauseCallback* pause = NULL);
785 
817  common::Progressive StartLoadW(const WString& password = WString(), bool is_cache_stream = true,
818  common::PauseCallback* pause = NULL);
819 
829  int GetFirstAvailPageIndex() const;
830 
841  bool IsXFA() const;
842 
848  bool IsCPDF() const;
849 
855  bool IsCDRM() const;
856 
862  String GetDocURI();
870 
877  bool IsEncrypted() const;
878 
884  void ClearRenderCache();
885 
900 
908 
920  PasswordType CheckPassword(const String& password);
921 
933  PasswordType CheckPassword(const foxit::WString& password);
934 
944  String GetUserPassword(const String& owner_password);
945 
954 
963 
972 
981 
994 
1021  bool SaveAs(const char* file_path, uint32 save_flags = PDFDoc::e_SaveFlagNormal);
1022 
1049  bool SaveAs(const wchar_t* file_path, uint32 save_flags = PDFDoc::e_SaveFlagNormal);
1050 
1084  common::Progressive StartSaveAs(const char* file_path,
1085  uint32 save_flags = PDFDoc::e_SaveFlagNormal,
1086  common::PauseCallback* pause = NULL);
1087 
1121  common::Progressive StartSaveAs(const wchar_t* file_path,
1122  uint32 save_flags = PDFDoc::e_SaveFlagNormal,
1123  common::PauseCallback* pause = NULL);
1124 
1161 
1170 
1180 
1188  bool RemoveBookmark(const Bookmark& bookmark);
1189 
1195  int GetPageCount() const;
1196 
1210  PDFPage GetPage(int index);
1211 
1220  DisplayMode GetDisplayMode() const;
1221 
1232  void SetDisplayMode(DisplayMode display_mode);
1233 
1240 
1247 
1256 
1263 
1270 
1279 
1297 
1305  void DeleteIndirectObject(uint32 object_number);
1306 
1313  uint32 GetUserPermissions() const;
1314 
1321  bool IsWrapper() const;
1322 
1329  WrapperType GetWrapperType() const;
1330 
1338  WrapperData GetWrapperData() const;
1339 
1346  int64 GetWrapperOffset() const;
1347 
1355 
1373 
1399  bool SaveAsWrapperFile(const wchar_t* file_path, const WrapperData* wrapper_data = NULL,
1400  uint32 user_permissions = 0xFFFFFFFC, const char* owner_password = "");
1401 
1429  common::Progressive StartSaveAsPayloadFile(const wchar_t* file_path, const wchar_t* payload_file_path,
1430  const wchar_t* crypto_filter, const wchar_t* description, float version,
1431  uint32 save_flags = PDFDoc::e_SaveFlagNormal,
1432  common::PauseCallback* pause = NULL);
1444  bool HasForm() const;
1445 
1452 
1462 
1476  ReadingBookmark InsertReadingBookmark(int reading_bookmark_index, const WString& title, int dest_page_index);
1477 
1485  bool RemoveReadingBookmark(const ReadingBookmark& reading_bookmark);
1486 
1492  int GetSignatureCount();
1493 
1502  Signature GetSignature(int index);
1503 
1511  void RemoveSignature(const Signature& signature);
1512 
1525  PDFPage InsertPage(int index, float width, float height);
1539 
1548  bool RemovePage(int index);
1559  bool RemovePage(const foxit::pdf::PDFPage& page);
1560 
1576  bool MovePageTo(const PDFPage& page, int dest_index);
1577 
1598  bool MovePagesTo(const common::Range& page_range, int dest_index);
1599 
1650  const wchar_t* src_file_path, const String& password,
1651  uint32 flags = PDFDoc::e_ImportFlagNormal, const char* layer_name = "",
1652  const common::Range& page_range = common::Range(),
1653  common::PauseCallback* pause = NULL);
1704  const wchar_t* src_file_path, const WString& password,
1705  uint32 flags = PDFDoc::e_ImportFlagNormal, const char* layer_name = "",
1706  const common::Range& page_range = common::Range(),
1707  common::PauseCallback* pause = NULL);
1755  common::Progressive StartImportPages(int dest_index, const PDFDoc& src_doc,
1756  uint32 flags = PDFDoc::e_ImportFlagNormal, const char* layer_name = "",
1757  const common::Range& page_range = common::Range(),
1758  common::PauseCallback* pause = NULL);
1759 
1776  bool ImportFromFDF(const fdf::FDFDoc& fdf_doc, int types = pdf::PDFDoc::e_Forms | pdf::PDFDoc::e_Annots, const common::Range& page_range = common::Range());
1777 
1793  bool ExportToFDF(const fdf::FDFDoc& fdf_doc, int types = pdf::PDFDoc::e_Forms | pdf::PDFDoc::e_Annots, const common::Range& page_range = common::Range());
1794 
1803  bool ExportAnnotToFDF(const annots::Annot& pdf_annot,const fdf::FDFDoc& fdf_doc);
1804 
1810  String GetHeader() const;
1811 
1817  int GetFileVersion();
1818 
1832  void SetFileVersion(int version);
1833 
1846  bool SetSecurityHandler(const SecurityHandler& handler);
1847 
1858 
1868  bool RemoveSecurity();
1869 
1877  int GetFontCount();
1878 
1887  common::Font GetFont(int index);
1888 
1895 
1907  bool SetOpenAction(actions::Action& action);
1908 
1914  bool RemoveOpenAction();
1915 
1921  bool DoJSOpenAction();
1922 
1928  bool IsPortfolio();
1929 
1944  PageBasicInfo GetPageBasicInfo(int index);
1945 };
1946 } // namespace pdf
1947 } // namespace foxit
1948 #endif // FS_PDFDOC_H_
1949 
PageBasicInfo GetPageBasicInfo(int index)
Get the basic information of a page specified by index.
ImportPageFlags
Enumeration for flags used for importing pages.
Definition: fs_pdfdoc.h:491
bool SaveAsWrapperFile(const wchar_t *file_path, const WrapperData *wrapper_data=0, uint32 user_permissions=0xFFFFFFFC, const char *owner_password="")
Save current PDF document as a wrapper file.
Bookmark GetRootBookmark()
Get bookmark root node.
Operate text annotations and fill in interactive form fields. (Bit 6 in permission value)
Definition: fs_pdfdoc.h:414
int version
Wrapper version.
Definition: fs_pdfdoc.h:122
Form fields are to imported from or exported to FDF/XFDF document.
Definition: fs_pdfdoc.h:536
~PDFDoc()
Destructor.
int GetReadingBookmarkCount()
Get the count of reading bookmarks.
bool RemoveBookmark(const Bookmark &bookmark)
Remove a specified bookmark.
void Set(float version, const wchar_t *crypto_filter, const wchar_t *file_name, int64 file_size, const wchar_t *description)
Set value.
Definition: fs_pdfdoc.h:195
Annotations are to imported from or exported to FDF/XFDF document.
Definition: fs_pdfdoc.h:538
Bookmark CreateRootBookmark()
Create new bookmark root node.
bool SetSecurityHandler(const SecurityHandler &handler)
Set a PDF security handler for encryption, such as standard encryption(password), certificate encrypt...
common::Progressive StartSaveAs(const char *file_path, uint32 save_flags=PDFDoc::e_SaveFlagNormal, common::PauseCallback *pause=0)
Start to save current PDF document as another PDF file.
bool operator==(const PDFDoc &other) const
Equal operator.
Definition: fs_common.h:1026
File writing interface.
Definition: fx_stream.h:449
int GetFirstAvailPageIndex() const
Get the page index of the fist available page.
void ClearRenderCache()
Clear the cache used during rendering, to reduce the memory usage.
bool HasForm() const
Check whether current PDF document has interactive form (also known as AcroForm).
StdEncryptData GetStdEncryptData() const
Get encrypt data of standard encryption (known as password encryption).
ErrorCode Load(const String &password="")
Load current document content by using a specified password.
RMSEncryptData GetRMSEncryptData() const
Get encrypt data of RMS encryption.
common::Progressive StartSaveAsPayloadFile(const wchar_t *file_path, const wchar_t *payload_file_path, const wchar_t *crypto_filter, const wchar_t *description, float version, uint32 save_flags=PDFDoc::e_SaveFlagNormal, common::PauseCallback *pause=0)
Start to save current PDF document as a wrapper document with a payload document (defined in PDF 2....
CFX_Object Object
Object type.
Definition: fs_basictypes.h:216
Save document normally, without using any special flag. This can only be used alone.
Definition: fs_pdfdoc.h:453
Extract PDF contents. (Bit 5 in permission value)
Definition: fs_pdfdoc.h:407
float version
The version number of the cryptographic filter used to encrypt the encrypted payload referenced by th...
Definition: fs_pdfdoc.h:204
Assemble PDF document. (Bit 11 in permission value)
Definition: fs_pdfdoc.h:436
Unknown rotation.
Definition: fs_common.h:229
Encryption type: password, which is the standard encryption.
Definition: fs_pdfdoc.h:367
bool ExportAnnotToFDF(const annots::Annot &pdf_annot, const fdf::FDFDoc &fdf_doc)
Export specified annotation to a FDF/XFDF document.
PayLoadData(const PayLoadData &payload_data)
Constructor, with another PayLoadData object.
Definition: fs_pdfdoc.h:163
objects::PDFDictionary * GetTrailer() const
Get the trailer dictionary.
WrapperType
Enumeration for wrapper type.
Definition: fs_pdfdoc.h:548
Modify PDF contents. (Bit 4 in permission value)
Definition: fs_pdfdoc.h:399
SecurityHandler GetSecurityHandler()
Get current PDF security handler of current document.
bool SetOpenAction(actions::Action &action)
Set the action to be performed when the document is opened.
A user password is used in PDF document.
Definition: fs_pdfdoc.h:351
WString description
Description for payload file to show applications or confront users prompt information.
Definition: fs_pdfdoc.h:212
bool ImportFromFDF(const fdf::FDFDoc &fdf_doc, int types=pdf::PDFDoc::e_Forms|pdf::PDFDoc::e_Annots, const common::Range &page_range=common::Range())
Import form fields and annotations from a FDF/XFDF document.
PageBasicInfo()
Constructor.
Definition: fs_pdfdoc.h:235
common::Progressive StartLoad(const String &password="", bool is_cache_stream=true, common::PauseCallback *pause=0)
Start to loading current document content by using a specified password.
int64 GetWrapperOffset() const
Get wrapper offset if current document's wrapper type is PDFDoc::e_WrapperFoxit.
common::Progressive StartImportPages(int dest_index, const PDFDoc &src_doc, uint32 flags=PDFDoc::e_ImportFlagNormal, const char *layer_name="", const common::Range &page_range=common::Range(), common::PauseCallback *pause=0)
Start to import pages from another PDF document (via PDF document object).
bool MovePagesTo(const common::Range &page_range, int dest_index)
Move one or more pages (specified by index) to a new index position.
WString crypto_filter
The name of the cryptographic filter used to encrypt the encrypted payload document.
Definition: fs_pdfdoc.h:206
Header file for file operation related definitions and functions.
File reading interface.
Definition: fx_stream.h:555
Import pages with layers.
Definition: fs_pdfdoc.h:495
objects::PDFDictionary * GetCatalog() const
Get the catalog dictionary.
Encryption type: customized encryption.
Definition: fs_pdfdoc.h:373
WIDE STRING CLASS.
Definition: fx_string.h:1463
bool IsLinearized() const
Check if current PDF document is a linearized file.
WString description
Description for wrapper file to show applications or confront users prompt information.
Definition: fs_pdfdoc.h:130
Save document without original data or unchanged objects.
Definition: fs_pdfdoc.h:469
Save document incrementally.
Definition: fs_pdfdoc.h:461
bool IsWrapper() const
Check whether current document is a wrapper file or not.
CFX_WideString WString
Wide string.
Definition: fs_basictypes.h:218
void SetFileVersion(int version)
Set the PDF file version which will be stored in PDF header section of the saved PDF file.
int GetFileVersion()
Get PDF file version stored in PDF header section.
float height
Page height.
Definition: fs_pdfdoc.h:280
String GetEndpoint()
Get the URL of ConnectedPDF Web services if current PDF is a connected PDF.
No password is used in PDF document.
Definition: fs_pdfdoc.h:349
PasswordType CheckPassword(const String &password)
Check the type of a specified password.
PasswordType GetPasswordType() const
Get the type of current used password.
FX_UINT64 uint64
Unsigned 64-bit integer.
Definition: fs_basictypes.h:191
uint32 GetUserPermissions() const
Get user access permissions.
Print PDF document with higher qualities. (Bit 12 in permission value)
Definition: fs_pdfdoc.h:443
Definition: fs_pdfdoc.h:134
Definition: fs_pdfdoc.h:338
Normal document.
Definition: fs_pdfdoc.h:550
Definition: fs_security.h:550
PayLoadData & operator=(const PayLoadData &payload_data)
Assign operator.
Definition: fs_pdfdoc.h:177
ReadingBookmark InsertReadingBookmark(int reading_bookmark_index, const WString &title, int dest_page_index)
Insert a reading bookmark to current PDF document.
bool IsEmpty() const
Check whether current object is empty or not.
int64 file_size
The payload file size.
Definition: fs_pdfdoc.h:210
bool ExportToFDF(const fdf::FDFDoc &fdf_doc, int types=pdf::PDFDoc::e_Forms|pdf::PDFDoc::e_Annots, const common::Range &page_range=common::Range())
Export form fields and annotations to a FDF/XFDF document.
An owner password is used in PDF document.
Definition: fs_pdfdoc.h:353
Header file for bookmark related definitions and classes.
PDFDoc()
Constructor.
Definition: fs_fdfdoc.h:51
objects::PDFDictionary * GetPagesDict() const
Get the dictionary of "Pages".
Definition: fs_security.h:937
Definition: fs_security.h:133
void RemoveSignature(const Signature &signature)
Remove a signature.
Import pages without cloning stream objects into memory.
Definition: fs_pdfdoc.h:502
common::Progressive StartGetPayloadFile(foxit::common::file::WriterCallback *payload_file, common::PauseCallback *pause=0)
Start to get payload file.
Header file for reading bookmark related definitions and classes.
bool DoJSOpenAction()
Perform JavaScript actions when the document is opened.
int GetSignatureCount()
Get the count of signature.
uint64 GetFileSize()
Get file size.
Definition: fs_pdfdoc.h:219
SaveFlags
Enumeration for PDF document saving flags.
Definition: fs_pdfdoc.h:451
ErrorCode LoadW(const WString &password=WString())
Load current document content by using a specified password.
ErrorCode
Enumeration for error code.
Definition: fs_basictypes.h:233
PageBasicInfo(float width, float height, common::Rotation rotation)
Constructor, with parameters.
Definition: fs_pdfdoc.h:229
WString type
Wrapper type to indicate a type of the current wrapper file.
Definition: fs_pdfdoc.h:124
int GetFontCount()
Count all the PDF fonts used in current PDF document.
Import pages normally.
Definition: fs_pdfdoc.h:493
Definition: fs_pdfdoc.h:52
bool RemoveOpenAction()
Remove the action to be performed when the document is opened.
When document is opened, neither document outlines nor thumbnail images are visible.
Definition: fs_pdfdoc.h:512
DisplayMode
Enumeration for display mode which specifies how the document should be displayed when opened.
Definition: fs_pdfdoc.h:510
float width
Page width.
Definition: fs_pdfdoc.h:278
EncryptType GetEncryptionType() const
Get the encryption type.
Signature GetSignature(int index)
Get a signature by index.
objects::PDFDictionary * GetEncryptDict() const
Get the encrypt dictionary.
Size
Enumeration for page size type.
Definition: fs_pdfpage.h:389
WString file_name
The payload file name.
Definition: fs_pdfdoc.h:208
Definition: fx_basic.h:3566
objects::PDFDictionary * GetInfo() const
Get the information dictionary.
bool IsXFA() const
Check whether current PDF document is an XFA document.
When document is opened, full-screen mode, with no menu bar, window controls, or any other windows ar...
Definition: fs_pdfdoc.h:521
Print PDF document with normal mode. (Bit 3 in permission value)
Definition: fs_pdfdoc.h:392
Encryption type: Foxit connected PDF DRM encryption.
Definition: fs_pdfdoc.h:377
Save document as a linearized file.
Definition: fs_pdfdoc.h:483
When document is opened, document outlines (bookmarks) are visible.
Definition: fs_pdfdoc.h:514
bool IsPortfolio()
Check whether current PDF document is a portfolio file or not.
PasswordType
Enumeration for the type of current used password in a PDF document.
Definition: fs_pdfdoc.h:345
When document is opened, optional content group panels are visible.
Definition: fs_pdfdoc.h:523
Definition: fs_common.h:382
FX_INT64 int64
Signed 64-bit integer.
Definition: fs_basictypes.h:189
CustomEncryptData GetCustomEncryptData() const
Get encrypt data of custom encryption.
Disabilities support. (Bit 10 in permission value)
Definition: fs_pdfdoc.h:428
DataType
Enumeration for data type used to decide which object(s) will be imported from or exported to FDF/XFD...
Definition: fs_pdfdoc.h:534
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
void SetDisplayMode(DisplayMode display_mode)
Set the display mode.
bool operator!=(const PDFDoc &other) const
Not equal operator.
Definition: fs_pdfpage.h:306
bool RemoveReadingBookmark(const ReadingBookmark &reading_bookmark)
Remove a reading bookmark from current PDF document.
Encryption type: digital certificate encryption.
Definition: fs_pdfdoc.h:369
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
WrapperType GetWrapperType() const
Get Wrapper type.
Header file for common definitions and classes.
When document is opened, attachment panels are visible.
Definition: fs_pdfdoc.h:525
ReadingBookmark GetReadingBookmark(int index)
Get a reading bookmark by index.
No encryption pattern.
Definition: fs_pdfdoc.h:365
void Set(int version, const wchar_t *type, const wchar_t *app_id, const wchar_t *uri, const wchar_t *description)
Set value.
Definition: fs_pdfdoc.h:113
The password is invalid.
Definition: fs_pdfdoc.h:347
PDFDoc & operator=(const PDFDoc &other)
Assign operator.
void DeleteIndirectObject(uint32 object_number)
Delete an indirect object by indirect object number.
Definition: fs_security.h:797
objects::PDFObject * GetIndirectObject(uint32 object_number)
Get an indirect object by indirect object number.
WString uri
The URI for consumers to get more information.
Definition: fs_pdfdoc.h:128
String GetDocURI()
Get the URI of connected PDF if current PDF is a connected PDF.
Header file for PDF object related definitions and classes.
Encryption type: Microsoft RMS encryption.
Definition: fs_pdfdoc.h:375
bool IsCPDF() const
Check whether the loaded document is a ConnectedPDF document or not.
Definition: fs_basictypes.h:333
DisplayMode GetDisplayMode() const
Get the display mode.
String GetHeader() const
Get PDF header identifying the version of the PDF specification to which the file conforms.
common::Font GetFont(int index)
Get a font by index.
Fill PDF form. (Bit 9 in permission value)
Definition: fs_pdfdoc.h:421
int GetPageCount() const
Get the count of pages.
Header file for PDF page related definitions and classes.
PDFPage GetPage(int index)
Get a PDF page by index.
bool RemoveSecurity()
Remove the security handler from current document, so that the later saved document will be unencrypt...
CertificateEncryptData GetCertificateEncryptData() const
Get encrypt data of certificate encryption.
WrapperData(int version, const wchar_t *type, const wchar_t *app_id, const wchar_t *uri, const wchar_t *description)
Constructor, with parameters.
Definition: fs_pdfdoc.h:67
Definition: fs_annot.h:756
PDFPage InsertPage(int index, float width, float height)
Insert a new blank PDF page to document, by index.
Save document by using XRef stream.
Definition: fs_pdfdoc.h:476
Definition: fs_security.h:56
Definition: fs_common.h:1176
Definition: fs_pdfobject.h:762
bool IsEncrypted() const
Check whether current document is an encrypted file or not.
String GetUserPassword(const String &owner_password)
Get the user password based on owner password.
actions::Action GetOpenAction()
Get the action to be performed when the document is opened.
PayLoadData(float version, const wchar_t *crypto_filter, const wchar_t *file_name, foxit::int64 file_size, const wchar_t *description)
Constructor, with parameters.
Definition: fs_pdfdoc.h:150
bool SaveAs(const char *file_path, uint32 save_flags=PDFDoc::e_SaveFlagNormal)
Save current PDF document as another PDF file.
Annotations (except link annotations) are to imported from or exported to FDF/XFDF document.
Definition: fs_pdfdoc.h:540
Rotation
Enumeration for rotation.
Definition: fs_common.h:219
Foxit namespace.
Definition: fs_connectedpdf.h:26
Definition: fs_pdfobject.h:55
WrapperData & operator=(const WrapperData &wrapper_data)
Assign operator.
Definition: fs_pdfdoc.h:93
DRMEncryptData GetDRMEncryptData() const
Get encrypt data of Foxit DRM encryption.
Definition: fs_action.h:424
WString app_id
Application identity to indicate applications to open this wrapper data.
Definition: fs_pdfdoc.h:126
common::Progressive StartLoadW(const WString &password=WString(), bool is_cache_stream=true, common::PauseCallback *pause=0)
Start to loading current document content by using a specified password.
BYTE STRING CLASS.
Definition: fx_string.h:317
Unknown encryption type.
Definition: fs_pdfdoc.h:363
EncryptType
Enumeration for encryption type.
Definition: fs_pdfdoc.h:361
bool IsTaggedPDF() const
Check if current PDF document is a Tagged PDF file.
PDF 2.0 wrapper document.
Definition: fs_pdfdoc.h:554
common::Rotation rotation
Page rotation. Please refer to values starting from common::e_Rotation0 and this should be one of the...
Definition: fs_pdfdoc.h:285
When document is opened, thumbnail images are visible.
Definition: fs_pdfdoc.h:516
#define NULL
The null-pointer value.
Definition: fx_system.h:767
Definition: fs_signature.h:83
Page size: letter.
Definition: fs_pdfpage.h:391
PayLoadData()
Constructor.
Definition: fs_pdfdoc.h:137
Encryption type: Foxit DRM encryption.
Definition: fs_pdfdoc.h:371
common::Progressive StartImportPagesFromFilePath(int dest_index, const wchar_t *src_file_path, const String &password, uint32 flags=PDFDoc::e_ImportFlagNormal, const char *layer_name="", const common::Range &page_range=common::Range(), common::PauseCallback *pause=0)
Start to import pages from another PDF document (via file path).
WrapperData GetWrapperData() const
Get wrapper data if current document's wrapper type is PDFDoc::e_WrapperFoxit.
PageBasicInfo & operator=(const PageBasicInfo &page_info)
Assign operator.
Definition: fs_pdfdoc.h:255
PageBasicInfo(const PageBasicInfo &page_info)
Constructor, with another PageBasicInfo object.
Definition: fs_pdfdoc.h:244
Definition: fs_security.h:332
bool RemovePage(int index)
Remove a PDF page by page index.
WrapperData()
Constructor.
Definition: fs_pdfdoc.h:55
Definition: fs_bookmark.h:58
bool IsCDRM() const
Check whether the loaded document is a ConnectedPDF DRM document or not.
void Set(float width, float height, common::Rotation rotation)
Set value.
Definition: fs_pdfdoc.h:271
Definition: fs_readingbookmark.h:43
UserPermissions
Enumeration for user access permissions in a PDF document.
Definition: fs_pdfdoc.h:385
WrapperData(const WrapperData &wrapper_data)
Constructor, with another WrapperData object.
Definition: fs_pdfdoc.h:79
Foxit wrapper document.
Definition: fs_pdfdoc.h:552
PayLoadData GetPayLoadData()
Get payload data if current document's wrapper type is PDFDoc::e_WrapperPDFV2.
uint32 AddIndirectObject(objects::PDFObject *pdf_object)
Add a PDF object to current PDF document, to be an indirect object.
bool MovePageTo(const PDFPage &page, int dest_index)
Move a specified page to a new index position.

Foxit Software Corporation Logo
@2018 Foxit Software Incorporated. All rights reserved.