Foxit PDF SDK

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 #ifndef __EMSCRIPTEN_RENDER__
21 #include "pdf/fs_bookmark.h"
22 #include "pdf/fs_headerfooter.h"
23 #endif
24 #include "pdf/fs_pdfpage.h"
25 #ifndef __EMSCRIPTEN_RENDER__
26 #include "pdf/fs_readingbookmark.h"
27 #endif
28 #include "pdf/objects/fs_pdfobject.h"
29
35 namespace foxit {
36 namespace fdf {
37 #ifndef __EMSCRIPTEN_RENDER__
38 class FDFDoc;
39 #endif
40 } // namespace fdf
41 namespace pdf {
42 // forward declaration
43 namespace actions {
44 class Action;
45 } // namespace actions
46 namespace interform {
47 class Form;
48 } // namespace interform;
49 class ReadingBookmark;
50 class SecurityHandler;
51 class StdEncryptData;
52 class CertificateEncryptData;
53 class DRMEncryptData;
54 class CustomEncryptData;
55 class RMSEncryptData;
56 class PagingSealSignature;
57 class WatermarkTextProperties;
59 class TiledWatermarkSettings FS_FINAL : public Object{
60 public:
66 typedef enum _Flags {
68 e_FlagAsPageContents = 0x0000,
70 e_FlagAsAnnot = 0x0001,
72 e_FlagOnTop = 0x0002,
74 e_FlagNoPrint = 0x0004,
76 e_FlagInvisible = 0x0008
77 } Flags;
78
94 explicit TiledWatermarkSettings(float row_space, float col_space, float rotation, int opacity ,int scale, uint32 flags)
95 : row_space(row_space)
96 , col_space(col_space)
97 , rotation(rotation)
98 , opacity(opacity)
99 , scale(scale)
100 , flags(flags){}
101
109 TiledWatermarkSettings()
110 : row_space(2.0)
111 , col_space(2.0)
112 , rotation(0)
113 , opacity(100)
114 , scale(100)
115 , flags(0){}
116
122 TiledWatermarkSettings(const TiledWatermarkSettings& settings)
123 : row_space(settings.row_space)
124 , col_space(settings.col_space)
125 , rotation(settings.rotation)
126 , opacity(settings.opacity)
127 , scale(settings.scale)
128 , flags(settings.flags){}
129
137 TiledWatermarkSettings& operator = (const TiledWatermarkSettings& settings) {
138 row_space = settings.row_space;
139 col_space = settings.col_space;
140 rotation = settings.rotation;
141 opacity = settings.opacity;
142 scale = settings.scale;
143 flags = settings.flags;
144 return *this;
145 }
146
164 void Set(float row_space, float col_space, float rotation, int opacity, int scale, uint32 flags) {
165 this->row_space = row_space;
166 this->col_space = col_space;
167 this->rotation = rotation;
168 this->opacity = opacity;
169 this->scale = scale;
170 this->flags = flags;
171 }
172
174 float row_space;
175
177 float col_space;
178
180 float rotation;
181
186 int opacity;
187
192 int scale;
193
201 uint32 flags;
202 };
203
205 class WrapperData FS_FINAL : public Object {
206 public:
208 WrapperData()
209 : version(0) {}
210
220 WrapperData(int version, const wchar_t* type, const wchar_t* app_id, const wchar_t* uri, const wchar_t* description)
221 : version(version)
222 , type(type)
223 , app_id(app_id)
224 , uri(uri)
225 , description(description) {}
226
232 WrapperData(const WrapperData& wrapper_data)
233 : version(wrapper_data.version)
234 , type(wrapper_data.type)
235 , app_id(wrapper_data.app_id)
236 , uri(wrapper_data.uri)
237 , description(wrapper_data.description) {}
238
246 WrapperData& operator = (const WrapperData& wrapper_data) {
247 version = wrapper_data.version;
248 type = wrapper_data.type;
249 app_id = wrapper_data.app_id;
250 uri = wrapper_data.uri;
251 description = wrapper_data.description;
252 return *this;
253 }
254
266 void Set(int version, const wchar_t* type, const wchar_t* app_id, const wchar_t* uri, const wchar_t* description) {
267 this->version = version;
268 this->type = type;
269 this->app_id = app_id;
270 this->uri = uri;
271 this->description = description;
272 }
273
275 int version;
277 WString type;
279 WString app_id;
281 WString uri;
283 WString description;
284 };
285
287 class PayLoadData FS_FINAL {
288 public:
290 PayLoadData()
291 : version(0.0f)
292 , file_size (0){}
293
303 PayLoadData(float version, const wchar_t* crypto_filter, const wchar_t* file_name,
304 foxit::int64 file_size,
305 const wchar_t* description)
306 : version(version)
307 , crypto_filter(crypto_filter)
308 , file_name(file_name)
309 , file_size(file_size)
310 , description(description)
311 {}
312
318 PayLoadData(const PayLoadData& payload_data)
319 : version(payload_data.version)
320 , crypto_filter(payload_data.crypto_filter)
321 , file_name(payload_data.file_name)
322 , file_size(payload_data.file_size)
323 , description(payload_data.description)
324 {}
325
333 PayLoadData& operator=(const PayLoadData& payload_data) {
334 version = payload_data.version;
335 crypto_filter = payload_data.crypto_filter;
336 description = payload_data.description;
337 file_name = payload_data.file_name;
338 file_size = payload_data.file_size;
339 return *this;
340 }
341
351 void Set(float version, const wchar_t* crypto_filter, const wchar_t* file_name,
352 int64 file_size,
353 const wchar_t* description) {
354 this->version = version;
355 this->crypto_filter = crypto_filter;
356 this->file_name = file_name;
357 this->file_size = file_size;
358 this->description = description;
359 }
360
362 float version;
364 WString crypto_filter;
366 WString file_name;
368 int64 file_size;
370 WString description;
371 };
372
374 class HiddenInfoSettingData FS_FINAL: public Object{
375 public:
379 HiddenInfoSettingData()
380 : enable_remove_metadata(true)
381 , enable_remove_fileattachment(true)
382 , enable_remove_bookmark(true)
383 , enable_remove_searchIndex(true)
384 , enable_remove_comment(true)
385 , enable_remove_form_fields(true)
386 , enable_remove_hidden_text(true)
387 , enable_remove_hidden_layer(true)
388 , enable_remove_content(true)
389 , enable_remove_link(true)
390 , enable_remove_overlaping(true) { }
391
399 HiddenInfoSettingData & operator = (const HiddenInfoSettingData & data) {
400 enable_remove_metadata = data.enable_remove_metadata;
401 enable_remove_fileattachment = data.enable_remove_fileattachment;
402 enable_remove_bookmark = data.enable_remove_bookmark;
403 enable_remove_searchIndex = data.enable_remove_searchIndex;
404 enable_remove_comment = data.enable_remove_comment;
405 enable_remove_form_fields = data.enable_remove_form_fields;
406 enable_remove_hidden_text = data.enable_remove_hidden_text;
407 enable_remove_hidden_layer = data.enable_remove_hidden_layer;
408 enable_remove_content = data.enable_remove_content;
409 enable_remove_link = data.enable_remove_link;
410 enable_remove_overlaping = data.enable_remove_overlaping;
411 return *this;
412 }
413
419 bool enable_remove_metadata;
420
426 bool enable_remove_fileattachment;
427
433 bool enable_remove_bookmark;
434
440 bool enable_remove_searchIndex;
441
447 bool enable_remove_comment;
448
454 bool enable_remove_form_fields;
455
461 bool enable_remove_hidden_text;
462
468 bool enable_remove_hidden_layer;
469
475 bool enable_remove_content;
476
482 bool enable_remove_link;
483
489 bool enable_remove_overlaping;
490 };
491
496 class PageBasicInfo FS_FINAL : public Object {
497 public:
506 PageBasicInfo(float width, float height, common::Rotation rotation)
507 : width(width)
508 , height(height)
509 , rotation(rotation) {}
510
512 PageBasicInfo()
513 : width(0)
514 , height(0)
515 , rotation(CommonDefines::e_RotationUnknown) {}
521 PageBasicInfo(const PageBasicInfo& page_info)
522 : width(page_info.width)
523 , height(page_info.height)
524 , rotation(page_info.rotation) {}
532 PageBasicInfo& operator = (const PageBasicInfo& page_info) {
533 width = page_info.width;
534 height = page_info.height;
535 rotation = page_info.rotation;
536 return *this;
537 }
548 void Set(float width, float height, common::Rotation rotation) {
549 this->width = width;
550 this->height = height;
551 this->rotation = rotation;
552 }
553
555 float width;
556
558 float height;
563 common::Rotation rotation;
564 };
565
567 FSDK_DEFINE_ARRAY(PageBasicInfoArray, PageBasicInfo)
568
569
573 class EmbeddedFontData FS_FINAL : public Object {
574 public:
576 EmbeddedFontData() {}
577
583 EmbeddedFontData(const EmbeddedFontData& other)
584 : nonstandard_font_name_array(other.nonstandard_font_name_array)
585 , standard_font_name_array(other.standard_font_name_array) {}
586
594 EmbeddedFontData& operator=(const EmbeddedFontData& other) {
595 nonstandard_font_name_array = other.nonstandard_font_name_array;
596 standard_font_name_array = other.standard_font_name_array;
597 return *this;
598 }
599
601 WStringArray nonstandard_font_name_array;
603 WStringArray standard_font_name_array;
604 };
605
607 class TableOfContentsConfig FS_FINAL : public Object{
608 public:
618 TableOfContentsConfig(const wchar_t* title, Int32Array bookmark_level_array, bool is_show_serial_number, bool include_toc_pages)
619 : title(title)
620 , bookmark_level_array(bookmark_level_array)
621 , is_show_serial_number(is_show_serial_number)
622 , include_toc_pages(include_toc_pages){}
623
625 TableOfContentsConfig()
626 : title(L"")
627 , bookmark_level_array(NULL)
628 , is_show_serial_number(false)
629 , include_toc_pages(false){}
630
638 TableOfContentsConfig& operator = (const TableOfContentsConfig& other) {
639 this->title = other.title;
640 this->bookmark_level_array = other.bookmark_level_array;
641 this->is_show_serial_number = other.is_show_serial_number;
642 this->include_toc_pages = other.include_toc_pages;
643 return *this;
644 }
645
653 bool operator == (const TableOfContentsConfig& other) const {
654 if (this->title == other.title && this->is_show_serial_number == other.is_show_serial_number && this->include_toc_pages == other.include_toc_pages) {
655 if (this->bookmark_level_array.GetSize() != other.bookmark_level_array.GetSize())
656 return false;
657 for (int i = 0; i < this->bookmark_level_array.GetSize(); i++) {
658 if (this->bookmark_level_array.GetAt(i) != other.bookmark_level_array.GetAt(i))
659 return false;
660 }
661 return true;
662 }
663 return false;
664 }
665
673 bool operator != (const TableOfContentsConfig& other) const {
674 if (this->title != other.title || this->is_show_serial_number != other.is_show_serial_number || this->include_toc_pages != other.include_toc_pages)
675 return true;
676 if (this->bookmark_level_array.GetSize() != other.bookmark_level_array.GetSize())
677 return true;
678 for (int i = 0; i < this->bookmark_level_array.GetSize(); i++) {
679 if (this->bookmark_level_array.GetAt(i) != other.bookmark_level_array.GetAt(i))
680 return true;
681 }
682 return false;
683 }
684
696 void Set(const wchar_t* title, Int32Array bookmark_level_array, bool is_show_serial_number, bool include_toc_pages) {
697 this->title = title;
698 this->bookmark_level_array = bookmark_level_array;
699 this->is_show_serial_number = is_show_serial_number;
700 this->include_toc_pages = include_toc_pages;
701 }
702
704 WString title;
705
712 Int32Array bookmark_level_array;
713
715 bool is_show_serial_number;
720 bool include_toc_pages;
721 };
722
776 class PDFDoc FS_FINAL : public Base {
777 public:
783 typedef enum _PasswordType {
785 e_PwdInvalid = 0,
787 e_PwdNoPassword = 1,
789 e_PwdUser = 2,
791 e_PwdOwner = 3
792 } PasswordType;
793
799 typedef enum _EncryptType {
801 e_EncryptUnknown = -1,
803 e_EncryptNone = 0,
805 e_EncryptPassword = 1,
807 e_EncryptCertificate = 2,
809 e_EncryptFoxitDRM = 3,
811 e_EncryptCustom = 4,
813 e_EncryptRMS = 5,
815 e_EncryptCDRM = 6
816 } EncryptType;
817
823 typedef enum _UserPermissions {
829 e_PermPrint = 0x0004,
836 e_PermModify = 0x0008,
842 e_PermExtract = 0x0010,
848 e_PermAnnotForm = 0x0020,
854 e_PermFillForm = 0x0100,
860 e_PermExtractAccess = 0x0200,
867 e_PermAssemble = 0x0400,
873 e_PermPrintHigh = 0x0800
874 } UserPermissions;
875
880 typedef enum _SaveFlags {
886 e_SaveFlagNormal = 0,
894 e_SaveFlagIncremental = 0x0001,
902 e_SaveFlagNoOriginal = 0x0002,
907 e_SaveFlagXRefStream = 0x0008,
914 e_SaveFlagLinearized = 0x1000,
921 e_SaveFlagRemoveRedundantObjects = 0x0010,
928 e_SaveFlagNoUpdatingMetadataDateTime = 0x0020
929 } SaveFlags;
930
936 typedef enum _ImportPageFlags {
938 e_ImportFlagNormal = 0,
940 e_ImportFlagWithLayers = 0x0001,
946 e_ImportFlagShareStream = 0x0002
947 } ImportPageFlags;
948
954 typedef enum _ExtractPagesOptions {
956 e_ExtractPagesOptionAnnotation = 0x0001,
958 e_ExtractPagesOptionStructureTree = 0x0002,
960 e_ExtractPagesOptionJavascript = 0x0004,
962 e_ExtractPagesOptionOCProperties = 0x0008,
967 e_ExtractPagesOptionObjectStream = 0x0010,
969 e_ExtractPagesOptionAttachFiles = 0x0020,
971 e_ExtractPagesOptionBookmark = 0x0040,
973 e_ExtractPagesOptionSignature = 0x0080
974 } ExtractPagesOptions;
975
981 typedef enum _InsertDocOptions {
983 e_InsertDocOptionAttachments = 0x0001,
985 e_InsertDocOptionBookmark = 0x0002
986 } InsertDocOptions;
987
993 typedef enum _DisplayMode {
995 e_DisplayUseNone = 0,
997 e_DisplayUseOutlines = 1,
999 e_DisplayUseThumbs = 2,
1004 e_DisplayFullScreen = 3,
1006 e_DisplayUseOC = 4,
1008 e_DisplayUseAttachment = 5
1009 } DisplayMode;
1010
1017 typedef enum _DataType {
1019 e_Forms = 0x0001,
1021 e_Annots = 0x0002,
1023 e_Links = 0x0004
1024 } DataType;
1025
1031 typedef enum _WrapperType {
1033 e_WrapperNone = 0,
1035 e_WrapperFoxit = 1,
1037 e_WrapperPDFV2 = 2
1038 } WrapperType;
1039
1040
1047 PDFDoc();
1048
1057 explicit PDFDoc(const char* path);
1058
1067 explicit PDFDoc(const wchar_t* path);
1068
1079 explicit PDFDoc(const void* buffer, size_t size);
1080
1095 explicit PDFDoc(common::file::ReaderCallback* file_read, bool is_async = false);
1096 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1097 explicit PDFDoc(FS_HANDLE handle);
1099 ~PDFDoc();
1100
1106 PDFDoc(const PDFDoc& other);
1107
1115 PDFDoc& operator = (const PDFDoc& other);
1123 bool operator == (const PDFDoc& other) const;
1124
1132 bool operator != (const PDFDoc& other) const;
1133
1141 bool IsEmpty() const;
1142
1148 uint64 GetFileSize();
1149
1169 bool IsLinearized() const;
1170
1179 bool IsTaggedPDF() const;
1180
1202 ErrorCode Load(const String& password = "");
1203
1226 ErrorCode LoadW(const WString& password = WString());
1227
1259 common::Progressive StartLoad(const String& password = "", bool is_cache_stream = true,
1260 common::PauseCallback* pause = NULL);
1292 common::Progressive StartLoadW(const WString& password = WString(), bool is_cache_stream = true,
1293 common::PauseCallback* pause = NULL);
1294
1304 int GetFirstAvailPageIndex() const;
1305
1316 bool IsXFA() const;
1317
1324 bool IsEncrypted() const;
1325
1331 void ClearRenderCache();
1332
1346 PasswordType GetPasswordType() const;
1347
1354 EncryptType GetEncryptionType() const;
1355
1370 PasswordType CheckPassword(const String& password);
1371
1386 PasswordType CheckPassword(const foxit::WString& password);
1387
1396 bool IsUserPassword(const String& password);
1397
1406 bool IsUserPassword(const foxit::WString& password);
1407
1416 bool IsOwnerPassword(const String& password);
1417
1426 bool IsOwnerPassword(const foxit::WString& password);
1427
1437 String GetUserPassword(const String& owner_password);
1438 #ifndef __EMSCRIPTEN_RENDER__
1439
1446 StdEncryptData GetStdEncryptData() const;
1447
1455 CertificateEncryptData GetCertificateEncryptData() const;
1456
1464 DRMEncryptData GetDRMEncryptData() const;
1465
1473 CustomEncryptData GetCustomEncryptData() const;
1474
1486 RMSEncryptData GetRMSEncryptData() const;
1487 #endif
1488
1514 bool SaveAs(const char* file_path, uint32 save_flags = PDFDoc::e_SaveFlagNormal);
1515
1542 bool SaveAs(const wchar_t* file_path, uint32 save_flags = PDFDoc::e_SaveFlagNormal);
1543
1577 common::Progressive StartSaveAs(const char* file_path,
1578 uint32 save_flags = PDFDoc::e_SaveFlagNormal,
1579 common::PauseCallback* pause = NULL);
1580
1614 common::Progressive StartSaveAs(const wchar_t* file_path,
1615 uint32 save_flags = PDFDoc::e_SaveFlagNormal,
1616 common::PauseCallback* pause = NULL);
1617
1651 common::Progressive StartSaveAs(foxit::common::file::WriterCallback* file,
1652 foxit::uint32 save_flags = PDFDoc::e_SaveFlagNormal,
1653 foxit::common::PauseCallback* pause = NULL);
1654
1655 #ifndef __EMSCRIPTEN_RENDER__
1656
1663 Bookmark GetRootBookmark();
1664
1673 Bookmark CreateRootBookmark();
1674
1681 int GetBookmarkLevelDepth();
1682
1690 bool RemoveBookmark(const Bookmark& bookmark);
1691
1698 bool HasLayer() const;
1699
1706 bool HasHeaderFooter();
1707
1716 HeaderFooter GetEditableHeaderFooter();
1717
1728 void AddHeaderFooter(const HeaderFooter& headerfooter);
1729
1740 void UpdateHeaderFooter(const HeaderFooter& headerfooter);
1741
1747 bool RemoveAllHeaderFooters();
1748 #endif
1749
1754 int GetPageCount() const;
1755
1769 PDFPage GetPage(int index);
1770
1779 DisplayMode GetDisplayMode() const;
1780
1791 void SetDisplayMode(DisplayMode display_mode);
1792
1799 objects::PDFDictionary* GetCatalog() const;
1800
1807 objects::PDFDictionary* GetTrailer() const;
1808
1817 objects::PDFDictionary* GetInfo() const;
1818
1825 objects::PDFDictionary* GetEncryptDict() const;
1826
1833 objects::PDFDictionary* GetPagesDict() const;
1834
1842 objects::PDFObject* GetIndirectObject(uint32 object_number);
1843
1860 uint32 AddIndirectObject(objects::PDFObject* pdf_object);
1861
1869 void DeleteIndirectObject(uint32 object_number);
1870
1877 uint32 GetUserPermissions() const;
1878
1885 bool IsWrapper() const;
1886
1893 WrapperType GetWrapperType() const;
1894
1901 WrapperData GetWrapperData() const;
1902
1909 int64 GetWrapperOffset() const;
1910
1917 PayLoadData GetPayLoadData();
1918
1935 common::Progressive StartGetPayloadFile(foxit::common::file::WriterCallback* payload_file, common::PauseCallback* pause = NULL);
1936
1962 bool SaveAsWrapperFile(const wchar_t* file_path, const WrapperData* wrapper_data = NULL,
1963 uint32 user_permissions = 0xFFFFFFFC, const char* owner_password = "");
1964
1992 common::Progressive StartSaveAsPayloadFile(const wchar_t* file_path, const wchar_t* payload_file_path,
1993 const wchar_t* crypto_filter, const wchar_t* description, float version,
1994 uint32 save_flags = PDFDoc::e_SaveFlagNormal,
1995 common::PauseCallback* pause = NULL);
2007 bool HasForm() const;
2008
2014 int GetReadingBookmarkCount();
2015 #ifndef __EMSCRIPTEN_RENDER__
2016
2024 ReadingBookmark GetReadingBookmark(int index);
2025
2039 ReadingBookmark InsertReadingBookmark(int reading_bookmark_index, const WString& title, int dest_page_index);
2040
2048 bool RemoveReadingBookmark(const ReadingBookmark& reading_bookmark);
2049
2055 int GetSignatureCount();
2056
2065 foxit::pdf::Signature GetSignature(int index);
2066
2076 void RemoveSignature(const foxit::pdf::Signature& signature);
2077 #endif
2078
2091 PDFPage InsertPage(int index, float width, float height);
2104 PDFPage InsertPage(int index, foxit::pdf::PDFPage::Size size = PDFPage::e_SizeLetter);
2105
2124 PDFPage AddPageFromTemplate(const wchar_t* template_name);
2125
2141 bool HidePageTemplate(const wchar_t* template_name);
2142
2151 bool RemovePage(int index);
2152
2163 bool RemovePage(const foxit::pdf::PDFPage& page);
2164
2186 bool MovePageTo(const PDFPage& page, int dest_index);
2187
2213 bool MovePagesTo(const common::Range& page_range, int dest_index);
2214
2267 common::Progressive StartImportPagesFromFilePath(int dest_index,
2268 const wchar_t* src_file_path, const String& password,
2269 uint32 flags = PDFDoc::e_ImportFlagNormal, const char* layer_name = "",
2270 const common::Range& page_range = common::Range(),
2271 common::PauseCallback* pause = NULL);
2323 common::Progressive StartImportPagesFromFilePath(int dest_index,
2324 const wchar_t* src_file_path, const WString& password,
2325 uint32 flags = PDFDoc::e_ImportFlagNormal, const char* layer_name = "",
2326 const common::Range& page_range = common::Range(),
2327 common::PauseCallback* pause = NULL);
2377 common::Progressive StartImportPages(int dest_index, const PDFDoc& src_doc,
2378 uint32 flags = PDFDoc::e_ImportFlagNormal, const char* layer_name = "",
2379 const common::Range& page_range = common::Range(),
2380 common::PauseCallback* pause = NULL);
2381
2404 common::Progressive StartExtractPages(const char* file_path, uint32 options, const common::Range& page_range = common::Range(),
2405 common::PauseCallback* pause = NULL);
2406
2429 common::Progressive StartExtractPages(const wchar_t* file_path, uint32 options, const common::Range& page_range = common::Range(),
2430 common::PauseCallback* pause = NULL);
2431
2455 common::Progressive StartExtractPages(foxit::common::file::WriterCallback* file, uint32 options, const foxit::common::Range& page_range = common::Range(),
2456 foxit::common::PauseCallback* pause = NULL);
2457
2474 void InsertDocument(int dest_index, const PDFDoc& src_doc, uint32 options);
2475
2493 void InsertDocument(int dest_index, const PDFDoc& src_doc, uint32 options, const wchar_t* bookmark_title);
2494
2504 void Sanitize();
2505
2517 void RemoveHiddenInfo(const HiddenInfoSettingData& hidden_data_setting);
2518
2519 #ifndef __EMSCRIPTEN_RENDER__
2520
2543 bool ImportFromFDF(const fdf::FDFDoc& fdf_doc, int types = pdf::PDFDoc::e_Forms | pdf::PDFDoc::e_Annots, const common::Range& page_range = common::Range());
2544
2564 bool ExportToFDF(const fdf::FDFDoc& fdf_doc, int types = pdf::PDFDoc::e_Forms | pdf::PDFDoc::e_Annots, const common::Range& page_range = common::Range());
2565
2574 bool ExportAnnotToFDF(const annots::Annot& pdf_annot,const fdf::FDFDoc& fdf_doc);
2575
2588 bool ExportFormFieldsToFDF(const pdf::interform::FieldArray& field_array, bool is_include, const fdf::FDFDoc& fdf_doc);
2589 #endif
2590
2596 String GetHeader() const;
2597
2603 int GetFileVersion();
2604
2620 void SetFileVersion(int version);
2621
2634 bool SetSecurityHandler(const SecurityHandler& handler);
2635
2645 SecurityHandler GetSecurityHandler();
2646
2656 bool RemoveSecurity();
2657
2665 int GetFontCount();
2666
2675 common::Font GetFont(int index);
2676
2682 actions::Action GetOpenAction();
2683
2695 bool SetOpenAction(actions::Action& action);
2696
2702 bool RemoveOpenAction();
2703
2709 bool DoJSOpenAction();
2710
2716 bool IsPortfolio();
2717
2732 PageBasicInfo GetPageBasicInfo(int index);
2733
2746 PageBasicInfoArray GetAllPageBasicInfo();
2747
2755 EmbeddedFontData GetEmbeddedFontData();
2756 #ifdef _SUPPORTWEBSDK_
2757 objects::PDFStream* CreateIcon(String imgStream,int width, int height);
2758 #endif
2759
2766 void CreateDSS();
2767
2783 void AddTableOfContents(const wchar_t* title, Int32Array bookmark_level_array);
2784
2794 void AddTableOfContents(const TableOfContentsConfig& table_of_contents_config);
2795
2812 void SetCacheFile(foxit::common::file::StreamCallback* file_stream, bool is_own_file_stream);
2813
2829 common::Progressive StartRecognizeForm(common::PauseCallback* pause = NULL);
2830
2847 common::Progressive StartRecognizeForm(bool is_set_tool_tips, common::PauseCallback* pause = NULL);
2848
2857 WString GetPageText(int page_index) const;
2858
2879 PagingSealSignature AddPagingSealSignature(const common::Range& page_range, float width, float height, bool to_check_permission = true);
2880
2899 common::Progressive StartEmbedAllFonts(common::PauseCallback* pause = NULL);
2929 common::Progressive StartAddTiledWatermark(const wchar_t* text, const TiledWatermarkSettings& settings, const WatermarkTextProperties& properties, const common::Range& page_range, common::PauseCallback* pause = NULL);
2957 common::Progressive StartAddTiledWatermark(const wchar_t* src_img_file_path, const TiledWatermarkSettings& settings, const common::Range& page_range, common::PauseCallback* pause = NULL);
2958
2987 common::Progressive StartAddTiledWatermark(foxit::common::file::ReaderCallback* src_img_stream, const TiledWatermarkSettings& settings, const common::Range& page_range, common::PauseCallback* pause = NULL);
3014 common::Progressive StartAddTiledWatermark(const foxit::pdf::PDFPage& page, const TiledWatermarkSettings& settings, const common::Range& page_range, common::PauseCallback* pause = NULL);
3015
3023 annots::AnnotArray GetAnnotsByIdArray(const WStringArray& unique_id_arr);
3024
3030 void RemoveStructTree();
3031
3032 };
3033 } // namespace pdf
3034 } // namespace foxit
3035 #endif // FS_PDFDOC_H_
3036
foxit::int64
FX_INT64 int64
Signed 64-bit integer.
Definition: fs_basictypes.h:189
foxit::pdf::PDFDoc::e_DisplayFullScreen
When document is opened, full-screen mode, with no menu bar, window controls, or any other windows ar...
Definition: fs_pdfdoc.h:1004
foxit::pdf::TiledWatermarkSettings::row_space
float row_space
The row spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative nu...
Definition: fs_pdfdoc.h:174
foxit::pdf::PDFDoc::GetFileVersion
int GetFileVersion()
Get PDF file version stored in PDF header section.
foxit::pdf::PDFDoc::ImportFromFDF
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.
foxit::pdf::PDFDoc::GetReadingBookmarkCount
int GetReadingBookmarkCount()
Get the count of reading bookmarks.
foxit::pdf::PDFDoc::GetPasswordType
PasswordType GetPasswordType() const
Get the type of current used password.
IFX_FileWrite
File writing interface.
Definition: fx_stream.h:470
foxit::pdf::PDFDoc::AddTableOfContents
void AddTableOfContents(const wchar_t *title, Int32Array bookmark_level_array)
Insert page(s) as the table of contents to the front of current PDF document.
CFX_ArrayTemplate::GetSize
int GetSize() const
Get the number of elements in the array.
Definition: fx_basic.h:1360
foxit::pdf::TableOfContentsConfig::include_toc_pages
bool include_toc_pages
true means to include catalog page(s) in the calculation of pages number in the table of contents,...
Definition: fs_pdfdoc.h:720
foxit::pdf::PDFDoc::SetDisplayMode
void SetDisplayMode(DisplayMode display_mode)
Set the display mode.
foxit::pdf::PDFDoc::RemoveReadingBookmark
bool RemoveReadingBookmark(const ReadingBookmark &reading_bookmark)
Remove a reading bookmark from current PDF document.
foxit::pdf::PDFDoc::IsTaggedPDF
bool IsTaggedPDF() const
Check if current PDF document is a Tagged PDF file.
foxit::pdf::PDFDoc::GetEncryptDict
objects::PDFDictionary * GetEncryptDict() const
Get the encrypt dictionary.
foxit::pdf::PDFDoc::SaveFlags
SaveFlags
Enumeration for PDF document saving flags.
Definition: fs_pdfdoc.h:880
foxit::pdf::PDFDoc::RemoveOpenAction
bool RemoveOpenAction()
Remove the action to be performed when the document is opened.
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::pdf::TableOfContentsConfig
Definition: fs_pdfdoc.h:607
foxit::pdf::PDFDoc::e_ExtractPagesOptionOCProperties
If set, that means OCProperties will be extracted as well.
Definition: fs_pdfdoc.h:962
foxit::pdf::HiddenInfoSettingData::enable_remove_link
bool enable_remove_link
A boolean value indicating whether to remove hyperlink annotations.
Definition: fs_pdfdoc.h:482
foxit::pdf::interform::FieldArray
Definition: fs_pdfform.h:44
foxit::pdf::PDFDoc::GetCatalog
objects::PDFDictionary * GetCatalog() const
Get the catalog dictionary.
foxit::pdf::PDFDoc::SetCacheFile
void SetCacheFile(foxit::common::file::StreamCallback *file_stream, bool is_own_file_stream)
Set cache file (represented by a file stream) to current PDF document.
foxit::pdf::PDFDoc::operator==
bool operator==(const PDFDoc &other) const
Equal operator.
foxit::pdf::WrapperData::WrapperData
WrapperData()
Constructor.
Definition: fs_pdfdoc.h:208
foxit::pdf::WrapperData::description
WString description
Description for wrapper file to show applications or confront users prompt information.
Definition: fs_pdfdoc.h:283
foxit::pdf::PDFDoc::GetWrapperOffset
int64 GetWrapperOffset() const
Get wrapper offset if current document's wrapper type is PDFDoc::e_WrapperFoxit.
foxit::pdf::PDFDoc::e_PwdUser
A user password is used in PDF document.
Definition: fs_pdfdoc.h:789
foxit::pdf::PDFDoc::UserPermissions
UserPermissions
Enumeration for user access permissions in a PDF document.
Definition: fs_pdfdoc.h:823
foxit::pdf::actions::Action
Definition: fs_action.h:418
foxit::pdf::PDFDoc::UpdateHeaderFooter
void UpdateHeaderFooter(const HeaderFooter &headerfooter)
Update header-footer.
foxit::pdf::PDFDoc::e_WrapperPDFV2
PDF 2.0 wrapper document.
Definition: fs_pdfdoc.h:1037
foxit::pdf::annots::Annot
Definition: fs_annot.h:1006
foxit::pdf::PDFDoc::DoJSOpenAction
bool DoJSOpenAction()
Perform JavaScript actions when the document is opened.
foxit::pdf::PDFDoc::GetUserPermissions
uint32 GetUserPermissions() const
Get user access permissions.
foxit::pdf::PDFDoc::MovePageTo
bool MovePageTo(const PDFPage &page, int dest_index)
Move a specified page to a new position.
foxit::pdf::PDFDoc::GetSignature
foxit::pdf::Signature GetSignature(int index)
Get a signature by index.
foxit::pdf::PDFDoc::GetHeader
String GetHeader() const
Get PDF header identifying the version of the PDF specification to which the file conforms.
foxit::pdf::PDFDoc::ExportFormFieldsToFDF
bool ExportFormFieldsToFDF(const pdf::interform::FieldArray &field_array, bool is_include, const fdf::FDFDoc &fdf_doc)
Export specified form fields to a FDF/XFDF document.
foxit::pdf::PayLoadData
Definition: fs_pdfdoc.h:287
foxit::pdf::TableOfContentsConfig::TableOfContentsConfig
TableOfContentsConfig(const wchar_t *title, Int32Array bookmark_level_array, bool is_show_serial_number, bool include_toc_pages)
Constructor, with parameter.
Definition: fs_pdfdoc.h:618
foxit::pdf::WrapperData
Definition: fs_pdfdoc.h:205
foxit::pdf::PDFPage::Size
Size
Enumeration for page size type.
Definition: fs_pdfpage.h:490
foxit::Object
CFX_Object Object
Object type.
Definition: fs_basictypes.h:220
foxit::pdf::PayLoadData::file_name
WString file_name
The payload file name.
Definition: fs_pdfdoc.h:366
foxit::pdf::TableOfContentsConfig::is_show_serial_number
bool is_show_serial_number
true means to show the serial number in the table of contents, while false means not to show the seri...
Definition: fs_pdfdoc.h:715
foxit::pdf::PDFDoc::GetSecurityHandler
SecurityHandler GetSecurityHandler()
Get current PDF security handler of current document.
foxit::common::Progressive
Definition: fs_common.h:373
foxit::pdf::TiledWatermarkSettings::e_FlagInvisible
If set, do not display a watermark.
Definition: fs_pdfdoc.h:76
foxit::pdf::CertificateEncryptData
Definition: fs_security.h:365
foxit::pdf::WrapperData::version
int version
Wrapper version.
Definition: fs_pdfdoc.h:275
foxit::pdf::HiddenInfoSettingData::enable_remove_bookmark
bool enable_remove_bookmark
A boolean value indicating whether to remove bookmarks.
Definition: fs_pdfdoc.h:433
foxit::pdf::PayLoadData::PayLoadData
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:303
foxit::pdf::EmbeddedFontData::EmbeddedFontData
EmbeddedFontData(const EmbeddedFontData &other)
Constructor, with another embedded font data object.
Definition: fs_pdfdoc.h:583
foxit::pdf::PDFDoc::ExportAnnotToFDF
bool ExportAnnotToFDF(const annots::Annot &pdf_annot, const fdf::FDFDoc &fdf_doc)
Export specified annotation to a FDF/XFDF document.
foxit::pdf::TableOfContentsConfig::operator==
bool operator==(const TableOfContentsConfig &other) const
Equal operator.
Definition: fs_pdfdoc.h:653
foxit::pdf::PDFDoc::IsLinearized
bool IsLinearized() const
Check if current PDF document is a linearized file.
foxit::pdf::PDFDoc::ExportToFDF
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.
foxit::pdf::EmbeddedFontData::EmbeddedFontData
EmbeddedFontData()
Constructor.
Definition: fs_pdfdoc.h:576
foxit::pdf::PDFDoc::WrapperType
WrapperType
Enumeration for wrapper type.
Definition: fs_pdfdoc.h:1031
IFX_FileStream
File stream interface, reading & writing.
Definition: fx_stream.h:692
foxit::pdf::TableOfContentsConfig::bookmark_level_array
Int32Array bookmark_level_array
A bookmark level array which is used to specify bookmarks to be used to generate "Table of Contents"....
Definition: fs_pdfdoc.h:712
foxit::pdf::PDFDoc::StartLoadW
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.
foxit::pdf::HiddenInfoSettingData::enable_remove_form_fields
bool enable_remove_form_fields
A boolean value indicating whether to remove interactive form fields.
Definition: fs_pdfdoc.h:454
foxit::pdf::PDFDoc::RemoveSecurity
bool RemoveSecurity()
Remove the security handler from current document, so that the later saved document will be unencrypt...
foxit::pdf::PDFDoc::PDFDoc
PDFDoc()
Constructor.
foxit::pdf::PDFDoc::RemoveStructTree
void RemoveStructTree()
Remove structure tree from current PDF document.
fs_common.h
Header file for common definitions and classes.
foxit::pdf::TiledWatermarkSettings::TiledWatermarkSettings
TiledWatermarkSettings()
Constructor and set the default value.
Definition: fs_pdfdoc.h:109
foxit::pdf::PDFDoc::SaveAsWrapperFile
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.
foxit::pdf::PDFDoc::RemoveAllHeaderFooters
bool RemoveAllHeaderFooters()
Remove all header-footers.
foxit::pdf::PDFDoc::DisplayMode
DisplayMode
Enumeration for display mode which specifies how the document should be displayed when opened.
Definition: fs_pdfdoc.h:993
foxit::pdf::PDFDoc::e_ExtractPagesOptionJavascript
If set, that means Javascript will be extracted as well.
Definition: fs_pdfdoc.h:960
foxit::pdf::PDFDoc::e_DisplayUseThumbs
When document is opened, thumbnail images are visible.
Definition: fs_pdfdoc.h:999
foxit::pdf::PDFDoc::e_EncryptNone
No encryption pattern.
Definition: fs_pdfdoc.h:803
CFX_ArrayTemplate< int32 >
foxit::pdf::PDFDoc::e_SaveFlagNoOriginal
Save document without original data or unchanged objects.
Definition: fs_pdfdoc.h:902
foxit::pdf::TiledWatermarkSettings::TiledWatermarkSettings
TiledWatermarkSettings(float row_space, float col_space, float rotation, int opacity, int scale, uint32 flags)
Constructor, with parameters.
Definition: fs_pdfdoc.h:94
foxit::pdf::PDFDoc::operator!=
bool operator!=(const PDFDoc &other) const
Not equal operator.
foxit::pdf::PDFDoc::RemoveBookmark
bool RemoveBookmark(const Bookmark &bookmark)
Remove a specified bookmark.
IFX_FileRead
File reading interface.
Definition: fx_stream.h:587
foxit::pdf::PDFDoc::GetIndirectObject
objects::PDFObject * GetIndirectObject(uint32 object_number)
Get an indirect object by indirect object number.
foxit::pdf::PDFDoc::CreateDSS
void CreateDSS()
Create DSS information in current PDF document.
foxit::pdf::PDFDoc::e_SaveFlagNoUpdatingMetadataDateTime
Save document without updating metadata "ModDate" and "CreationDate".
Definition: fs_pdfdoc.h:928
fs_file.h
Header file for file operation related definitions and functions.
foxit::pdf::PDFDoc::GetStdEncryptData
StdEncryptData GetStdEncryptData() const
Get encrypt data of standard encryption (known as password encryption).
foxit::pdf::RMSEncryptData
Definition: fs_security.h:1027
foxit::pdf::PDFDoc::GetInfo
objects::PDFDictionary * GetInfo() const
Get the information dictionary.
foxit::pdf::PDFDoc::SetFileVersion
void SetFileVersion(int version)
Set the PDF file version which will be stored in PDF header section of the saved PDF file.
foxit::pdf::PayLoadData::description
WString description
Description for payload file to show applications or confront users prompt information.
Definition: fs_pdfdoc.h:370
foxit::pdf::PDFDoc::GetUserPassword
String GetUserPassword(const String &owner_password)
Get the user password based on owner password.
foxit::pdf::EmbeddedFontData::operator=
EmbeddedFontData & operator=(const EmbeddedFontData &other)
Assign operator.
Definition: fs_pdfdoc.h:594
foxit::pdf::PDFDoc::GetWrapperData
WrapperData GetWrapperData() const
Get wrapper data if current document's wrapper type is PDFDoc::e_WrapperFoxit.
foxit::ErrorCode
ErrorCode
Enumeration for error code.
Definition: fs_basictypes.h:236
foxit::pdf::PDFDoc::GetAllPageBasicInfo
PageBasicInfoArray GetAllPageBasicInfo()
Get the basic information of all page.
foxit::pdf::PDFDoc::e_EncryptFoxitDRM
Encryption type: Foxit DRM encryption.
Definition: fs_pdfdoc.h:809
foxit::pdf::PDFDoc::e_ImportFlagNormal
Import pages normally.
Definition: fs_pdfdoc.h:938
foxit::pdf::PDFDoc::StartEmbedAllFonts
common::Progressive StartEmbedAllFonts(common::PauseCallback *pause=0)
Start to convert all un-embeded fonts to embeded fonts.
foxit::pdf::PDFDoc::GetSignatureCount
int GetSignatureCount()
Get the count of signature.
foxit::pdf::PDFDoc::StartExtractPages
common::Progressive StartExtractPages(const char *file_path, uint32 options, const common::Range &page_range=common::Range(), common::PauseCallback *pause=0)
Start to extract pages from current PDF document.
foxit::pdf::objects::PDFObject
Definition: fs_pdfobject.h:55
foxit::pdf::PDFDoc::GetFont
common::Font GetFont(int index)
Get a font by index.
foxit::pdf::TableOfContentsConfig::operator!=
bool operator!=(const TableOfContentsConfig &other) const
Not equal operator.
Definition: fs_pdfdoc.h:673
foxit::pdf::WatermarkTextProperties
Definition: fs_watermark.h:333
foxit::pdf::PDFDoc::ClearRenderCache
void ClearRenderCache()
Clear the cache used during rendering, to reduce the memory usage.
foxit::pdf::PDFDoc::e_EncryptPassword
Encryption type: password, which is the standard encryption.
Definition: fs_pdfdoc.h:805
foxit::pdf::PDFDoc::IsPortfolio
bool IsPortfolio()
Check whether current PDF document is a portfolio file or not.
foxit::pdf::PDFDoc::RemovePage
bool RemovePage(int index)
Remove a PDF page by page index.
foxit::pdf::PDFDoc::GetReadingBookmark
ReadingBookmark GetReadingBookmark(int index)
Get a reading bookmark by index.
foxit::pdf::PDFDoc::e_PermAssemble
Assemble PDF document. (Bit 11 in permission value)
Definition: fs_pdfdoc.h:867
foxit::pdf::PDFDoc::GetDisplayMode
DisplayMode GetDisplayMode() const
Get the display mode.
foxit::pdf::PDFDoc::e_DisplayUseOC
When document is opened, optional content group panels are visible.
Definition: fs_pdfdoc.h:1006
foxit::pdf::PDFDoc::HasLayer
bool HasLayer() const
Check whether current PDF document has layer (known as "Optional content group" in <PDF reference 1....
foxit::pdf::PDFDoc::GetPage
PDFPage GetPage(int index)
Get a PDF page by index.
foxit::pdf::PDFDoc::e_Links
(Reserved, not supported yet) If set, only link annotations are to imported from or exported to XFDF ...
Definition: fs_pdfdoc.h:1023
foxit::pdf::PDFDoc::GetFileSize
uint64 GetFileSize()
Get file size.
foxit::pdf::PDFDoc::e_SaveFlagRemoveRedundantObjects
Save document with removing redundant PDF objects.
Definition: fs_pdfdoc.h:921
foxit::pdf::HiddenInfoSettingData::enable_remove_fileattachment
bool enable_remove_fileattachment
A boolean value indicating whether to remove embedded file attachments.
Definition: fs_pdfdoc.h:426
foxit::pdf::TiledWatermarkSettings::scale
int scale
The image or page scale in percents. Valid range: from 1 to 100. 100 means the image or page is displ...
Definition: fs_pdfdoc.h:192
foxit::pdf::PDFDoc::e_DisplayUseAttachment
When document is opened, attachment panels are visible.
Definition: fs_pdfdoc.h:1008
foxit::pdf::PDFDoc::AddPagingSealSignature
PagingSealSignature AddPagingSealSignature(const common::Range &page_range, float width, float height, bool to_check_permission=true)
Add a paging seal signature to document by page range.
foxit::pdf::PDFDoc::e_ExtractPagesOptionSignature
If set, that means signature will be extracted as well. It must be combined with PDFDoc:e_ExtractPage...
Definition: fs_pdfdoc.h:973
foxit::pdf::PDFDoc::DataType
DataType
Enumeration for data type used to decide which object(s) will be imported from or exported to FDF/XFD...
Definition: fs_pdfdoc.h:1017
foxit::pdf::PDFDoc::e_Forms
If set, form fields are to imported from or exported to FDF/XFDF document.
Definition: fs_pdfdoc.h:1019
foxit::pdf::CustomEncryptData
Definition: fs_security.h:890
foxit::pdf::PDFDoc::Sanitize
void Sanitize()
Removes all hidden or potentially sensitive information from the current PDF document using default s...
foxit::pdf::EmbeddedFontData::nonstandard_font_name_array
WStringArray nonstandard_font_name_array
Font name array of embedded fonts which cannot be replaced by system fonts if they are to be unembede...
Definition: fs_pdfdoc.h:601
foxit::pdf::PDFDoc::ExtractPagesOptions
ExtractPagesOptions
Enumeration for options used for extracting pages.
Definition: fs_pdfdoc.h:954
foxit::pdf::PDFDoc::InsertPage
PDFPage InsertPage(int index, float width, float height)
Insert a new blank PDF page to document, by index.
foxit::pdf::PDFDoc::GetRMSEncryptData
RMSEncryptData GetRMSEncryptData() const
Get encrypt data of RMS encryption.
foxit::pdf::PDFDoc::e_EncryptCDRM
(Reserved, currently, this value is not used.) Encryption type: Foxit connected PDF DRM encryption.
Definition: fs_pdfdoc.h:815
CFX_ByteString
BYTE STRING CLASS.
Definition: fx_string.h:317
foxit::pdf::annots::AnnotArray
Definition: fs_annot.h:1666
foxit::pdf::PDFDoc::GetOpenAction
actions::Action GetOpenAction()
Get the action to be performed when the document is opened.
foxit::pdf::PageBasicInfo::PageBasicInfo
PageBasicInfo(float width, float height, common::Rotation rotation)
Constructor, with parameters.
Definition: fs_pdfdoc.h:506
foxit::pdf::TiledWatermarkSettings::e_FlagAsAnnot
If set, the watermark will be an annotation when inserted to a PDF page, and the watermark will be sh...
Definition: fs_pdfdoc.h:70
foxit::pdf::PDFDoc::e_DisplayUseNone
When document is opened, neither document outlines nor thumbnail images are visible.
Definition: fs_pdfdoc.h:995
foxit::pdf::PDFDoc::e_EncryptRMS
Encryption type: Microsoft RMS encryption.
Definition: fs_pdfdoc.h:813
foxit::pdf::PDFDoc::MovePagesTo
bool MovePagesTo(const common::Range &page_range, int dest_index)
Move one or more pages (specified by index) to a new position.
foxit::pdf::PDFDoc::HasHeaderFooter
bool HasHeaderFooter()
Check whether current document has header-footer.
foxit::pdf::PageBasicInfo::PageBasicInfo
PageBasicInfo()
Constructor.
Definition: fs_pdfdoc.h:512
foxit::pdf::PDFDoc::GetPageText
WString GetPageText(int page_index) const
Get the specified PDF page text which the text is in display order.
foxit::pdf::PDFDoc::e_EncryptUnknown
Unknown encryption type.
Definition: fs_pdfdoc.h:801
fs_headerfooter.h
Header file for header-footer related definitions and classes.
foxit::pdf::WrapperData::type
WString type
Wrapper type to indicate a type of the current wrapper file.
Definition: fs_pdfdoc.h:277
foxit::pdf::Signature
Definition: fs_signature.h:99
foxit::pdf::PDFDoc::GetFirstAvailPageIndex
int GetFirstAvailPageIndex() const
Get the page index of the fist available page.
CFX_ArrayTemplate::GetAt
const TYPE GetAt(int nIndex) const
This method retrieves an element specified by an index number.
Definition: fx_basic.h:1396
foxit::pdf::StdEncryptData
Definition: fs_security.h:137
foxit::pdf::PDFDoc::HidePageTemplate
bool HidePageTemplate(const wchar_t *template_name)
Hide a named page.
foxit::pdf::WrapperData::uri
WString uri
The URI for consumers to get more information.
Definition: fs_pdfdoc.h:281
foxit::pdf::PDFDoc::GetBookmarkLevelDepth
int GetBookmarkLevelDepth()
Get bookmark level depth.
foxit::common::Rotation
Rotation
Enumeration for rotation.
Definition: fs_common.h:57
foxit::pdf::PDFDoc::IsUserPassword
bool IsUserPassword(const String &password)
Check if input password is the user password of current PDF document.
foxit::common::e_RotationUnknown
Unknown rotation.
Definition: fs_common.h:67
foxit::pdf::PDFDoc::e_DisplayUseOutlines
When document is opened, document outlines (bookmarks) are visible.
Definition: fs_pdfdoc.h:997
foxit::pdf::PDFDoc::StartImportPages
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).
foxit::pdf::TiledWatermarkSettings::operator=
TiledWatermarkSettings & operator=(const TiledWatermarkSettings &settings)
Assign operator.
Definition: fs_pdfdoc.h:137
foxit::pdf::TableOfContentsConfig::Set
void Set(const wchar_t *title, Int32Array bookmark_level_array, bool is_show_serial_number, bool include_toc_pages)
Set value.
Definition: fs_pdfdoc.h:696
foxit::pdf::HiddenInfoSettingData
Configuration settings for removing hidden or sensitive data from a PDF document.
Definition: fs_pdfdoc.h:374
foxit::pdf::PDFDoc::StartSaveAs
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.
foxit::pdf::PDFDoc::StartLoad
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.
foxit::pdf::PDFDoc::operator=
PDFDoc & operator=(const PDFDoc &other)
Assign operator.
fs_pdfobject.h
Header file for PDF object related definitions and classes.
foxit::pdf::PageBasicInfo
Definition: fs_pdfdoc.h:496
foxit::pdf::PDFDoc::GetPageCount
int GetPageCount() const
Get the count of pages.
fs_pdfpage.h
Header file for PDF page related definitions and classes.
foxit::pdf::PayLoadData::operator=
PayLoadData & operator=(const PayLoadData &payload_data)
Assign operator.
Definition: fs_pdfdoc.h:333
foxit::pdf::PDFDoc::GetAnnotsByIdArray
annots::AnnotArray GetAnnotsByIdArray(const WStringArray &unique_id_arr)
Get annotations by the unique ID array.
foxit::pdf::PDFDoc::e_PermFillForm
Fill PDF form. (Bit 9 in permission value)
Definition: fs_pdfdoc.h:854
foxit::pdf::PDFDoc::SaveAs
bool SaveAs(const char *file_path, uint32 save_flags=PDFDoc::e_SaveFlagNormal)
Save current PDF document as another PDF file.
foxit::WString
CFX_WideString WString
Wide string.
Definition: fs_basictypes.h:222
foxit::pdf::PDFDoc::EncryptType
EncryptType
Enumeration for encryption type.
Definition: fs_pdfdoc.h:799
foxit::pdf::PDFDoc::e_ExtractPagesOptionBookmark
If set, that means bookmark will be extracted as well.
Definition: fs_pdfdoc.h:971
foxit::pdf::PageBasicInfo::operator=
PageBasicInfo & operator=(const PageBasicInfo &page_info)
Assign operator.
Definition: fs_pdfdoc.h:532
foxit::pdf::PDFDoc::StartRecognizeForm
common::Progressive StartRecognizeForm(common::PauseCallback *pause=0)
Start to recognize form in current PDF document.
foxit::pdf::WrapperData::WrapperData
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:220
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::SecurityHandler
Definition: fs_security.h:56
foxit::pdf::PayLoadData::PayLoadData
PayLoadData()
Constructor.
Definition: fs_pdfdoc.h:290
foxit::pdf::PDFDoc::AddIndirectObject
uint32 AddIndirectObject(objects::PDFObject *pdf_object)
Add a PDF object to current PDF document, to be an indirect object.
foxit::pdf::Bookmark
Definition: fs_bookmark.h:58
foxit::pdf::PDFDoc::InsertDocument
void InsertDocument(int dest_index, const PDFDoc &src_doc, uint32 options)
Insert another PDF document to the specified location of current PDF document.
foxit::pdf::PDFDoc::GetPageBasicInfo
PageBasicInfo GetPageBasicInfo(int index)
Get the basic information of a page specified by index.
foxit::pdf::PDFDoc::RemoveSignature
void RemoveSignature(const foxit::pdf::Signature &signature)
Remove a signature.
foxit::pdf::PDFDoc::e_SaveFlagIncremental
Save document incrementally.
Definition: fs_pdfdoc.h:894
foxit::pdf::ReadingBookmark
Definition: fs_readingbookmark.h:43
foxit::pdf::TiledWatermarkSettings::opacity
int opacity
Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque.
Definition: fs_pdfdoc.h:186
foxit::pdf::PDFDoc::e_ExtractPagesOptionAttachFiles
If set, that means attachment files will be extracted as well.
Definition: fs_pdfdoc.h:969
foxit::pdf::PDFDoc::e_Annots
If set, annotations (except link annotations) are to imported from or exported to FDF/XFDF document.
Definition: fs_pdfdoc.h:1021
IFX_Pause
Definition: fx_basic.h:3758
foxit::pdf::TiledWatermarkSettings::col_space
float col_space
The column spacing for multiple lines of tiled watermark. Its unit is inch and it can't be a negative...
Definition: fs_pdfdoc.h:177
foxit::pdf::PDFDoc::LoadW
ErrorCode LoadW(const WString &password=WString())
Load current document content by using a specified password.
foxit::pdf::PDFDoc::e_EncryptCertificate
Encryption type: digital certificate encryption.
Definition: fs_pdfdoc.h:807
foxit::pdf::TiledWatermarkSettings::flags
uint32 flags
Watermark flags.
Definition: fs_pdfdoc.h:201
foxit::pdf::objects::PDFDictionary
Definition: fs_pdfobject.h:850
foxit::pdf::PDFDoc::GetFontCount
int GetFontCount()
Count all the PDF fonts used in current PDF document.
foxit::pdf::PDFDoc::AddHeaderFooter
void AddHeaderFooter(const HeaderFooter &headerfooter)
Add new header-footer.
foxit::pdf::PDFDoc::HasForm
bool HasForm() const
Check whether current PDF document has interactive form (also known as AcroForm).
foxit::pdf::PageBasicInfo::Set
void Set(float width, float height, common::Rotation rotation)
Set value.
Definition: fs_pdfdoc.h:548
foxit::pdf::PDFDoc::StartAddTiledWatermark
common::Progressive StartAddTiledWatermark(const wchar_t *text, const TiledWatermarkSettings &settings, const WatermarkTextProperties &properties, const common::Range &page_range, common::PauseCallback *pause=0)
Add text type tiled watermark to PDF pages.
foxit::pdf::PDFDoc::e_ImportFlagWithLayers
Import pages with layers.
Definition: fs_pdfdoc.h:940
foxit::pdf::PDFDoc::e_PermAnnotForm
Operate text annotations and fill in interactive form fields. (Bit 6 in permission value)
Definition: fs_pdfdoc.h:848
foxit::pdf::PDFDoc::StartImportPagesFromFilePath
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).
foxit::pdf::PayLoadData::Set
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:351
foxit::pdf::WrapperData::Set
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:266
foxit::pdf::PDFDoc::e_ExtractPagesOptionStructureTree
If set, that means structure tree will be extracted as well.
Definition: fs_pdfdoc.h:958
foxit::pdf::HiddenInfoSettingData::enable_remove_comment
bool enable_remove_comment
A boolean value indicating whether to remove comments and annotations.
Definition: fs_pdfdoc.h:447
foxit::pdf::PDFDoc::InsertReadingBookmark
ReadingBookmark InsertReadingBookmark(int reading_bookmark_index, const WString &title, int dest_page_index)
Insert a reading bookmark to current PDF document.
foxit::pdf::PagingSealSignature
Definition: fs_signature.h:2091
foxit::pdf::PDFDoc::CheckPassword
PasswordType CheckPassword(const String &password)
Check the type of a specified password.
foxit::pdf::PDFDoc::InsertDocOptions
InsertDocOptions
Enumeration for options used for inserting a PDF document to another.
Definition: fs_pdfdoc.h:981
foxit::pdf::TiledWatermarkSettings::rotation
float rotation
Rotation angle in degrees.
Definition: fs_pdfdoc.h:180
foxit::pdf::TiledWatermarkSettings
Definition: fs_pdfdoc.h:59
foxit::pdf::PDFDoc::GetTrailer
objects::PDFDictionary * GetTrailer() const
Get the trailer dictionary.
foxit::pdf::PDFDoc::ImportPageFlags
ImportPageFlags
Enumeration for flags used for importing pages.
Definition: fs_pdfdoc.h:936
foxit::pdf::PDFDoc::SetOpenAction
bool SetOpenAction(actions::Action &action)
Set the action to be performed when the document is opened.
foxit::pdf::PDFDoc::e_ExtractPagesOptionAnnotation
If set, that means annotations related to extracted pages will be extracted as well.
Definition: fs_pdfdoc.h:956
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::pdf::HiddenInfoSettingData::enable_remove_searchIndex
bool enable_remove_searchIndex
A boolean value indicating whether to remove the search index.
Definition: fs_pdfdoc.h:440
foxit::pdf::PDFDoc::StartGetPayloadFile
common::Progressive StartGetPayloadFile(foxit::common::file::WriterCallback *payload_file, common::PauseCallback *pause=0)
Start to get payload file.
foxit::pdf::WrapperData::operator=
WrapperData & operator=(const WrapperData &wrapper_data)
Assign operator.
Definition: fs_pdfdoc.h:246
foxit::pdf::PDFDoc::e_SaveFlagNormal
Save document normally, without using any special flag.
Definition: fs_pdfdoc.h:886
foxit::pdf::PDFDoc::~PDFDoc
~PDFDoc()
Destructor.
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:776
foxit::pdf::PayLoadData::crypto_filter
WString crypto_filter
The name of the cryptographic filter used to encrypt the encrypted payload document.
Definition: fs_pdfdoc.h:364
foxit::pdf::HiddenInfoSettingData::operator=
HiddenInfoSettingData & operator=(const HiddenInfoSettingData &data)
Assign operator.
Definition: fs_pdfdoc.h:399
foxit::pdf::WrapperData::app_id
WString app_id
Application identity to indicate applications to open this wrapper data.
Definition: fs_pdfdoc.h:279
foxit::pdf::PDFDoc::RemoveHiddenInfo
void RemoveHiddenInfo(const HiddenInfoSettingData &hidden_data_setting)
Removes specified types of hidden information from the current PDF document based on user-defined set...
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:412
foxit::pdf::PDFDoc::e_ExtractPagesOptionObjectStream
If set, that means to use PDFDoc::e_SaveFlagXRefStream saving flag for the result file in order to re...
Definition: fs_pdfdoc.h:967
foxit::pdf::PDFDoc::GetEncryptionType
EncryptType GetEncryptionType() const
Get the encryption type.
foxit::pdf::PDFDoc::IsOwnerPassword
bool IsOwnerPassword(const String &password)
Check if input password is the owner password of current PDF document.
foxit::fdf::FDFDoc
Definition: fs_fdfdoc.h:51
foxit::pdf::PageBasicInfo::height
float height
Page height (unit is 1/72 inch).
Definition: fs_pdfdoc.h:558
foxit::pdf::PDFDoc::CreateRootBookmark
Bookmark CreateRootBookmark()
Create new bookmark root node.
foxit::pdf::PageBasicInfoArray
Definition: fs_pdfdoc.h:567
foxit::pdf::TableOfContentsConfig::operator=
TableOfContentsConfig & operator=(const TableOfContentsConfig &other)
Assign operator.
Definition: fs_pdfdoc.h:638
foxit::pdf::PDFDoc::AddPageFromTemplate
PDFPage AddPageFromTemplate(const wchar_t *template_name)
Adds a new PDF page to document, from a named template.
foxit::pdf::HiddenInfoSettingData::HiddenInfoSettingData
HiddenInfoSettingData()
Constructs a HiddenDataSetting object with all removal options enabled by default.
Definition: fs_pdfdoc.h:379
foxit::pdf::PDFDoc::e_ImportFlagShareStream
Import pages without cloning stream objects into memory.
Definition: fs_pdfdoc.h:946
foxit::pdf::PDFDoc::SetSecurityHandler
bool SetSecurityHandler(const SecurityHandler &handler)
Set a PDF security handler for encryption, such as standard encryption(password), certificate encrypt...
foxit::pdf::HiddenInfoSettingData::enable_remove_overlaping
bool enable_remove_overlaping
A boolean value indicating whether to remove overlapping objects.
Definition: fs_pdfdoc.h:489
foxit::pdf::DRMEncryptData
Definition: fs_security.h:646
foxit::pdf::PDFDoc::IsEncrypted
bool IsEncrypted() const
Check whether current document is an encrypted file or not.
foxit::pdf::PDFDoc::e_InsertDocOptionBookmark
If set, that means bookmark will be inserted to target document as well.
Definition: fs_pdfdoc.h:985
foxit::pdf::PayLoadData::version
float version
The version number of the cryptographic filter used to encrypt the encrypted payload referenced by th...
Definition: fs_pdfdoc.h:362
foxit::pdf::PDFDoc::GetEmbeddedFontData
EmbeddedFontData GetEmbeddedFontData()
Get embedded font data.
foxit::pdf::TableOfContentsConfig::TableOfContentsConfig
TableOfContentsConfig()
Constructor.
Definition: fs_pdfdoc.h:625
foxit::pdf::PDFDoc::e_PermPrintHigh
Print PDF document with higher qualities. (Bit 12 in permission value)
Definition: fs_pdfdoc.h:873
foxit::WStringArray
Definition: fs_basictypes.h:227
foxit::pdf::WrapperData::WrapperData
WrapperData(const WrapperData &wrapper_data)
Constructor, with another wrapper data object.
Definition: fs_pdfdoc.h:232
foxit::pdf::PayLoadData::file_size
int64 file_size
The payload file size.
Definition: fs_pdfdoc.h:368
foxit::pdf::HiddenInfoSettingData::enable_remove_metadata
bool enable_remove_metadata
A boolean value indicating whether to remove document metadata.
Definition: fs_pdfdoc.h:419
foxit::pdf::TiledWatermarkSettings::e_FlagNoPrint
If set, do not print a watermark.
Definition: fs_pdfdoc.h:74
foxit::pdf::TiledWatermarkSettings::Set
void Set(float row_space, float col_space, float rotation, int opacity, int scale, uint32 flags)
Set value.
Definition: fs_pdfdoc.h:164
foxit::pdf::HiddenInfoSettingData::enable_remove_hidden_layer
bool enable_remove_hidden_layer
A boolean value indicating whether to remove hidden layers (Optional Content Groups).
Definition: fs_pdfdoc.h:468
foxit::pdf::PDFDoc::IsWrapper
bool IsWrapper() const
Check whether current document is a wrapper file or not.
foxit::common::Font
Definition: fs_common.h:1523
foxit::pdf::PDFDoc::e_EncryptCustom
Encryption type: customized encryption.
Definition: fs_pdfdoc.h:811
foxit::pdf::PDFDoc::e_PwdOwner
An owner password is used in PDF document.
Definition: fs_pdfdoc.h:791
foxit::pdf::PageBasicInfo::PageBasicInfo
PageBasicInfo(const PageBasicInfo &page_info)
Constructor, with another page basic information object.
Definition: fs_pdfdoc.h:521
foxit::pdf::PDFDoc::e_PermModify
Modify PDF contents. (Bit 4 in permission value)
Definition: fs_pdfdoc.h:836
foxit::pdf::TiledWatermarkSettings::e_FlagAsPageContents
If set, the watermark will be a part of page content when inserted to a PDF page.
Definition: fs_pdfdoc.h:68
foxit::pdf::PDFDoc::IsXFA
bool IsXFA() const
Check whether current PDF document is an XFA document.
foxit::pdf::PageBasicInfo::rotation
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:563
foxit::pdf::PDFDoc::GetWrapperType
WrapperType GetWrapperType() const
Get Wrapper type.
foxit::pdf::PDFDoc::GetCustomEncryptData
CustomEncryptData GetCustomEncryptData() const
Get encrypt data of custom encryption.
foxit::pdf::PDFDoc::GetCertificateEncryptData
CertificateEncryptData GetCertificateEncryptData() const
Get encrypt data of certificate encryption.
foxit::pdf::EmbeddedFontData
Definition: fs_pdfdoc.h:573
foxit::pdf::EmbeddedFontData::standard_font_name_array
WStringArray standard_font_name_array
Font name array of embedded fonts which are standard fonts and can be replaced by system fonts if the...
Definition: fs_pdfdoc.h:603
foxit::pdf::PageBasicInfo::width
float width
Page width (unit is 1/72 inch).
Definition: fs_pdfdoc.h:555
foxit::pdf::PayLoadData::PayLoadData
PayLoadData(const PayLoadData &payload_data)
Constructor, with another payload data object.
Definition: fs_pdfdoc.h:318
foxit::pdf::objects::PDFStream
Definition: fs_pdfobject.h:448
foxit::pdf::HiddenInfoSettingData::enable_remove_content
bool enable_remove_content
A boolean value indicating whether to remove invisible or obscured content.
Definition: fs_pdfdoc.h:475
foxit::pdf::PDFDoc::GetPagesDict
objects::PDFDictionary * GetPagesDict() const
Get the dictionary of "Pages".
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
fs_bookmark.h
Header file for bookmark related definitions and classes.
foxit::pdf::TiledWatermarkSettings::e_FlagOnTop
If set, show watermark above other page content.
Definition: fs_pdfdoc.h:72
foxit::common::Range
Definition: fs_common.h:1368
foxit::pdf::PDFDoc::e_WrapperNone
Normal document.
Definition: fs_pdfdoc.h:1033
foxit::pdf::PDFDoc::GetDRMEncryptData
DRMEncryptData GetDRMEncryptData() const
Get encrypt data of Foxit DRM encryption.
foxit::pdf::PDFDoc::e_InsertDocOptionAttachments
If set, that means attachments will be inserted to target document as well.
Definition: fs_pdfdoc.h:983
foxit::pdf::PDFDoc::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::pdf::PDFDoc::GetPayLoadData
PayLoadData GetPayLoadData()
Get payload data if current document's wrapper type is PDFDoc::e_WrapperPDFV2.
foxit::pdf::TiledWatermarkSettings::TiledWatermarkSettings
TiledWatermarkSettings(const TiledWatermarkSettings &settings)
Constructor, with another tiled watermark settings object.
Definition: fs_pdfdoc.h:122
foxit::pdf::PDFDoc::GetRootBookmark
Bookmark GetRootBookmark()
Get bookmark root node.
fs_readingbookmark.h
Header file for reading bookmark related definitions and classes.
foxit::pdf::TableOfContentsConfig::title
WString title
Title for the table of contents. If this is an empty string, the default value "Table of Contents" wi...
Definition: fs_pdfdoc.h:704
foxit::pdf::PDFDoc::DeleteIndirectObject
void DeleteIndirectObject(uint32 object_number)
Delete an indirect object by indirect object number.
foxit::pdf::PDFDoc::e_WrapperFoxit
Foxit wrapper document.
Definition: fs_pdfdoc.h:1035
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
foxit::pdf::PDFDoc::GetEditableHeaderFooter
HeaderFooter GetEditableHeaderFooter()
Get the editable header footer object.
foxit::pdf::PDFDoc::e_SaveFlagXRefStream
Save document by using XRef stream.
Definition: fs_pdfdoc.h:907
foxit::pdf::PDFDoc::e_PermPrint
Print PDF document with normal mode. (Bit 3 in permission value)
Definition: fs_pdfdoc.h:829
foxit::pdf::PDFDoc::e_PwdInvalid
The password is invalid.
Definition: fs_pdfdoc.h:785
foxit::pdf::PDFDoc::e_PermExtract
Extract PDF contents. (Bit 5 in permission value)
Definition: fs_pdfdoc.h:842
foxit::pdf::PDFDoc::Load
ErrorCode Load(const String &password="")
Load current document content by using a specified password.
foxit::pdf::PDFDoc::e_PwdNoPassword
No password is used in PDF document.
Definition: fs_pdfdoc.h:787
foxit::uint64
FX_UINT64 uint64
Unsigned 64-bit integer.
Definition: fs_basictypes.h:191
foxit::pdf::HiddenInfoSettingData::enable_remove_hidden_text
bool enable_remove_hidden_text
A boolean value indicating whether to remove hidden text.
Definition: fs_pdfdoc.h:461
foxit::pdf::TiledWatermarkSettings::Flags
Flags
Enumeration for tiled watermark setting flags.
Definition: fs_pdfdoc.h:66
foxit::Base
Definition: fs_basictypes.h:451
foxit::pdf::PDFPage::e_SizeLetter
Page size: letter.
Definition: fs_pdfpage.h:492
foxit::pdf::PDFDoc::e_PermExtractAccess
Disabilities support. (Bit 10 in permission value)
Definition: fs_pdfdoc.h:860
foxit::pdf::PDFDoc::e_SaveFlagLinearized
Save document as a linearized file.
Definition: fs_pdfdoc.h:914
foxit::pdf::PDFDoc::PasswordType
PasswordType
Enumeration for the type of current used password in a PDF document.
Definition: fs_pdfdoc.h:783
foxit::pdf::PDFDoc::StartSaveAsPayloadFile
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....