Foxit PDF SDK

fs_optimization.h
浏览该文件的文档.
1
15 #ifndef FS_PDFOPTIMIZATION_H_
16 #define FS_PDFOPTIMIZATION_H_
17
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfdoc.h"
20 #include "pdf/fs_pdfpage.h"
21
27 namespace foxit {
31 namespace addon {
35 namespace optimization {
36 class ImageSettings;
37 class MonoImageSettings;
38 class OptimizerSettings;
39 class OptimizeScannedPDFSettings;
40
42 class AuditSpaceSize FS_FINAL : public Object{
43 public:
45 AuditSpaceSize()
46 : content_streams(0)
47 , images(0)
48 , fonts(0)
49 , bookmarks(0)
50 , x_object_forms(0)
51 , structure_infos(0)
52 , acroforms(0)
53 , link_annots(0)
54 , named_destnations(0)
55 , color_space(0)
56 , pattern_infos(0)
57 , piece_infos(0)
58 , comments_and_3d_contents(0)
59 , shading_pattern_infos(0)
60 , extend_graphics_states(0)
61 , cross_ref_tables(0)
62 , thumbs(0)
63 , embed_files(0)
64 , web_infos(0) { }
65
73 AuditSpaceSize & operator = (const AuditSpaceSize & data) {
74 content_streams = data.content_streams;
75 images = data.images;
76 fonts = data.fonts;
77 bookmarks = data.bookmarks;
78 x_object_forms = data.x_object_forms;
79 named_destnations = data.named_destnations;
80 structure_infos = data.structure_infos;
81 acroforms = data.acroforms;
82 link_annots = data.link_annots;
83 color_space = data.color_space;
84 pattern_infos = data.pattern_infos;
85 piece_infos = data.piece_infos;
86 comments_and_3d_contents = data.comments_and_3d_contents;
87 shading_pattern_infos = data.shading_pattern_infos;
88 extend_graphics_states = data.extend_graphics_states;
89 cross_ref_tables = data.cross_ref_tables;
90 thumbs = data.thumbs;
91 embed_files = data.embed_files;
92 web_infos = data.web_infos;
93 return (*this);
94 }
95
101 uint32 content_streams;
102
108 uint32 images;
109
115 uint32 fonts;
116
122 uint32 bookmarks;
123
129 uint32 x_object_forms;
130
136 uint32 structure_infos;
137
143 uint32 acroforms;
144
150 uint32 link_annots;
151
157 uint32 named_destnations;
158
164 uint32 color_space;
165
171 uint32 pattern_infos;
172
178 uint32 piece_infos;
179
185 uint32 comments_and_3d_contents;
186
192 uint32 shading_pattern_infos;
193
199 uint32 extend_graphics_states;
200
206 uint32 cross_ref_tables;
207
213 uint32 thumbs;
214
220 uint32 embed_files;
221
227 uint32 web_infos;
228 };
229
234 class ImageCompressionCallback {
235 public:
241 virtual void Release() = 0;
242
251 virtual common::file::StreamCallback* GetTemporaryFileStream(const common::Bitmap& bitmap) = 0;
252
253 protected:
254 ~ImageCompressionCallback() {}
255 };
256
264 class Optimizer FS_FINAL : public Base {
265 public:
266 typedef foxit::addon::optimization::OptimizerSettings OptimizerSettings;
267 typedef foxit::addon::optimization::OptimizeScannedPDFSettings OptimizeScannedPDFSettings;
284 static common::Progressive Optimize(const pdf::PDFDoc& doc,const OptimizerSettings& settings,common::PauseCallback* pause);
285
304 static common::Progressive StartSubsetEmbedFont(const pdf::PDFDoc& doc, common::PauseCallback* pause);
305
326 static common::Progressive OptimizeScannedPDF(const pdf::PDFDoc& doc, const OptimizeScannedPDFSettings& settings, ImageCompressionCallback* image_compress_callback, common::PauseCallback* pause);
327
335 static AuditSpaceSize ComputeAuditSpace(const pdf::PDFDoc& doc);
336 };
337
344 class ImageSettings FS_FINAL : public Base {
345 public:
351 typedef enum _ImageCompressMode {
353 e_ImageCompressHigh = 10003,
355 e_ImageCompressjpeg = 10005,
357 e_ImageCompressjpeg2000 = 10006,
359 e_ImageCompressRetain = 10007,
361 e_ImageCompressZip = 10009
362 } ImageCompressMode;
363
369 typedef enum _ImageCompressQuality {
371 e_ImageCompressQualityMinimum = 1,
373 e_ImageCompressQualityLow = 2,
375 e_ImageCompressQualityMedium = 3,
377 e_ImageCompressQualityHigh = 4,
379 e_ImageCompressQualityMaximum = 5,
381 e_ImageCompressQualityLossless = 6
382 } ImageCompressQuality;
383
389 typedef enum _StretchMode {
391 e_StretchDefault = -1,
393 e_StretchOff = 0x00,
395 e_StretchInterpol = 0x20,
397 e_StretchDownsample = 0x04,
399 e_StretchBicubic = 0x80,
401 e_StretchNoSmooth = 0x100
402 } StretchMode;
403
411 ImageSettings();
412
413 // 强烈建议用户不要使用此方法；否则可能出现未知情况。
414 explicit ImageSettings(FS_HANDLE handle);
415
417 ~ImageSettings();
418
424 ImageSettings(const ImageSettings& other);
425
433 ImageSettings& operator = (const ImageSettings& other);
441 bool operator == (const ImageSettings& other) const;
442
450 bool operator != (const ImageSettings& other) const;
451
459 bool IsEmpty() const;
460
472 void SetStretchMode(StretchMode mode);
473
485 void SetImageDPI(int32 dpi);
486
504 void SetImageDPILimit(int dpi_limit);
505
517 void SetCompressionMode(ImageCompressMode mode);
518
531 void SetQuality(ImageCompressQuality quality);
532
545 void SetBackgroundDownScale(int32 down_scale);
546
559 void SetForegroundDownScale(int32 down_scale);
560
576 void SetTextSensitivity(int32 text_sensitivity);
577
590 void SetTileSize(int size);
591 };
592
599 class MonoImageSettings FS_FINAL : public Base {
600 public:
606 typedef enum _MonoImageCompressMode {
608 e_ImageCompressCCITT3 = 10001,
610 e_ImageCompressCCITT4 = 10002,
612 e_ImageCompressHigh = 10003,
614 e_ImageCompressjbig2 = 10004,
616 e_ImageCompressRetain = 10007,
618 e_ImageCompressRunLength = 10008,
620 e_ImageCompressZip = 10009
621 } MonoImageCompressMode;
622
628 typedef enum _MonoImageCompressQuality {
630 e_ImageCompressQualityLossless = 1,
632 e_ImageCompressQualityLossy = 2,
634 e_ImageCompressQualityMinimum = 3,
636 e_ImageCompressQualityLow = 4,
638 e_ImageCompressQualityMedium = 5,
640 e_ImageCompressQualityHigh = 6,
642 e_ImageCompressQualityMaximum = 7
643 } MonoImageCompressQuality;
644
650 typedef enum _StretchMode {
652 e_StretchDefault = -1,
654 e_StretchOff = 0x00,
656 e_StretchInterpol = 0x20,
658 e_StretchDownsample = 0x04,
660 e_StretchBicubic = 0x80,
662 e_StretchNoSmooth = 0x100
663 } StretchMode;
664
672 MonoImageSettings();
673
674 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
675 explicit MonoImageSettings(FS_HANDLE handle);
676
678 ~MonoImageSettings();
679
685 MonoImageSettings(const MonoImageSettings& other);
686
694 MonoImageSettings& operator = (const MonoImageSettings& other);
702 bool operator == (const MonoImageSettings& other) const;
703
711 bool operator != (const MonoImageSettings& other) const;
712
720 bool IsEmpty() const;
721
733 void SetImageDPI(int32 dpi);
734
752 void SetImageDPILimit(int dpi_limit);
753
765 void SetCompressionMode(MonoImageCompressMode mode);
766
778 void SetStretchMode(StretchMode mode) ;
779
793 void SetQuality(MonoImageCompressQuality quality);
794 };
795
802 class UnembeddedFontSettings FS_FINAL : public Base {
803 public:
807 UnembeddedFontSettings();
808
809 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
810 explicit UnembeddedFontSettings(FS_HANDLE handle);
811
813 ~UnembeddedFontSettings();
814
820 UnembeddedFontSettings(const UnembeddedFontSettings& other);
821
829 UnembeddedFontSettings& operator=(const UnembeddedFontSettings& other);
830
838 bool operator==(const UnembeddedFontSettings& other) const;
839
847 bool operator!=(const UnembeddedFontSettings& other) const;
848
856 bool IsEmpty() const;
857
866 void SetSubsetAllEmFonts(bool is_subset_all_emb_fonts);
867
880 void SetUnembeddedFontNameArray(const WStringArray& font_name_array);
881 };
882
888 class OptimizerSettings FS_FINAL : public Base {
889 public:
895 typedef enum _OptimizerOptions {
897 e_OptimizerCompressImages = 0x01,
899 e_OptimizerCleanUp = 0x02,
901 e_OptimizerDiscardObjects = 0x04,
903 e_OptimizerUnembeddedFonts = 0x08,
905 e_OptimizerDiscardUserData = 0x10,
907 e_OptimizerTransparency = 0x20
908 } OptimizerOptions;
909
915 typedef enum _CleanUpOptions {
917 e_CleanUpUseFlateForNonEncodedStream = 0x01,
919 e_CleanUpUseFlateInsteadOfLZW = 0x02,
921 e_CleanUpRemoveInvalidBookmarks = 0x04,
923 e_CleanUpRemoveInvalidLinks = 0x08,
925 e_CleanUpDiscardUnreferencedNamedDes = 0x10,
927 e_CleanUpOptPageContent = 0x20
928 } CleanUpOptions;
929
935 typedef enum _DiscardObjectsOptions {
937 e_DiscardObjectsFormActions = 0x01,
939 e_DiscardObjectsFlattenFormFields = 0x02,
945 e_DiscardObjectsJavaScriptActions = 0x04,
947 e_DiscardObjectsEmbeddedPageThumbnails = 0x08,
949 e_DiscardObjectsEmbeddedPrintSettings = 0x10,
951 e_DiscardObjectsBookmarks = 0x20,
960 e_DiscardObjectsAlternateImages = 0x40,
962 e_DiscardObjectsDocumentTags = 0x80,
964 e_DiscardObjectsEmbeddedSearchIndex = 0x100,
966 e_DiscardObjectsDetectAndMergeImageFragment = 0x200,
968 e_DiscardObjectsSmoothlinestocurves = 0x400
969 } DiscardObjectsOptions;
970
976 typedef enum _DiscardUserDataOptions {
978 e_DiscardUserDataAllAnnotsFormsAndMultimedia = 0x01,
980 e_DiscardUserDataExternalCrossReferences = 0x02,
982 e_DiscardUserDataDocumentInfoAndMetaData = 0x04,
984 e_DiscardUserDataFileAttchments = 0x08,
986 e_DiscardUserDataPrivateDataOfOtherApp = 0x10,
988 e_DiscardUserDataLayer = 0x20,
990 e_DiscardUserAllData = 0x40
991 } DiscardUserDataOptions;
992
998 typedef enum _TransparencyMode {
1008 e_TransparencyModeLowResolution = 0,
1018 e_TransparencyModeMediumResolution = 1,
1028 e_TransparencyModeHighResolution = 2
1029 } TransparencyMode;
1030
1031
1039 OptimizerSettings();
1040
1041 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1042 explicit OptimizerSettings(FS_HANDLE handle);
1043
1045 ~OptimizerSettings();
1046
1052 OptimizerSettings(const OptimizerSettings& other);
1053
1061 OptimizerSettings& operator = (const OptimizerSettings& other);
1062
1070 bool operator == (const OptimizerSettings& other) const;
1071
1079 bool operator != (const OptimizerSettings& other) const;
1080
1088 bool IsEmpty() const;
1089
1103 void SetOptimizerOptions(uint32 optimize_options);
1104
1126 void SetColorGrayImageSettings(const ImageSettings& settings);
1127
1142 void SetColorImageSettings(const ImageSettings& settings);
1143
1158 void SetGrayscaleImageSettings(const ImageSettings& settings);
1159
1174 void SetMonoImageSettings(const MonoImageSettings& settings);
1175
1189 void SetUnembeddedFontSettings(const UnembeddedFontSettings& settings);
1190
1207 void SetCleanUpOptions(foxit::uint32 clean_up_options);
1208
1225 void SetDiscardObjectsOptions(foxit::uint32 discard_objects_options);
1226
1243 void SetDiscardUserDataOptions(foxit::uint32 discard_userdata_options);
1244
1260 void SetTransparencyMode(TransparencyMode transparency_mode);
1261 };
1262
1268 class OptimizeScannedPDFSettings FS_FINAL : public Base{
1269 public:
1275 typedef enum _ScannedImageCompressMode {
1277 e_ScannedImageCompressHigh = 1,
1279 e_ScannedImageCompressjpeg = 2,
1281 e_ScannedImageCompressjpeg2000LossLess = 3,
1283 e_ScannedImageCompressjpeg2000Lossy = 4
1284 } ScannedImageCompressMode;
1285
1291 typedef enum _ScannedMonoImageCompressMode {
1293 e_ScannedMonoImageCompressjbig2Lossy = 1,
1295 e_ScannedMonoImageCompressjbig2LossLess = 2,
1297 e_ScannedMonoImageCompressCCITT4 = 3,
1299 e_ScannedMonoImageCompressHigh = 4
1300 } ScannedMonoImageCompressMode;
1301
1302
1303 OptimizeScannedPDFSettings();
1304
1305 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1306 explicit OptimizeScannedPDFSettings(FS_HANDLE handle);
1307
1309 ~OptimizeScannedPDFSettings();
1310
1316 OptimizeScannedPDFSettings(const OptimizeScannedPDFSettings& other);
1317
1325 OptimizeScannedPDFSettings& operator = (const OptimizeScannedPDFSettings& other);
1333 bool operator == (const OptimizeScannedPDFSettings& other) const;
1334
1342 bool operator != (const OptimizeScannedPDFSettings& other) const;
1343
1351 bool IsEmpty() const;
1352
1362 void SetOptimizedPages(const common::Range& pages);
1363
1375 void SetColorGrayImageCompressionMode(ScannedImageCompressMode mode);
1376
1389 void SetColorGrayImageCompressionQuality(foxit::uint32 quality);
1390
1402 void SetMonoImageCompressionMode(ScannedMonoImageCompressMode mode);
1403 };
1404
1405 } // namespace optimization
1406 } // namespace addon
1407 } // namespace foxit
1408
1409 #endif
foxit::addon::optimization::MonoImageSettings::e_ImageCompressZip
压缩模式：ZIP。
Definition: fs_optimization.h:620
foxit::addon::optimization::MonoImageSettings::e_ImageCompressCCITT4
压缩模式：CCITT Group 4。
Definition: fs_optimization.h:610
foxit::addon::optimization::OptimizerSettings::SetColorImageSettings
void SetColorImageSettings(const ImageSettings &settings)
设置彩色图像的优化相关设置。
foxit::addon::optimization::OptimizerSettings::e_TransparencyModeHighResolution
透明度模式: 高分辨率。
Definition: fs_optimization.h:1028
foxit::addon::optimization::ImageSettings::e_ImageCompressQualityLow
压缩质量：低。
Definition: fs_optimization.h:373
foxit::addon::optimization::UnembeddedFontSettings::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::addon::optimization::OptimizeScannedPDFSettings::ScannedMonoImageCompressMode
ScannedMonoImageCompressMode
用于单色图像的压缩模式枚举。
Definition: fs_optimization.h:1291
foxit::addon::optimization::MonoImageSettings::e_ImageCompressQualityMedium
压缩质量：中等，仅适用于e_ImageCompressHigh压缩模式。
Definition: fs_optimization.h:638
foxit::addon::optimization::MonoImageSettings::MonoImageCompressMode
MonoImageCompressMode
用于单色图像的压缩模式枚举。
Definition: fs_optimization.h:606
foxit::common::Range
Definition: fs_common.h:1364
foxit::addon::optimization::MonoImageSettings::e_ImageCompressQualityHigh
压缩质量：高，仅适用于e_ImageCompressHigh压缩模式。
Definition: fs_optimization.h:640
foxit::common::Bitmap
Definition: fs_image.h:36
foxit::addon::optimization::OptimizerSettings::e_CleanUpDiscardUnreferencedNamedDes
丢弃未引用的命名目标。
Definition: fs_optimization.h:925
foxit::addon::optimization::MonoImageSettings::SetCompressionMode
void SetCompressionMode(MonoImageCompressMode mode)
设置用于优化PDF文档中单色图像的压缩模式。
foxit::addon::optimization::ImageSettings::e_ImageCompressZip
压缩模式：ZIP。
Definition: fs_optimization.h:361
foxit::addon::optimization::OptimizeScannedPDFSettings::SetColorGrayImageCompressionMode
void SetColorGrayImageCompressionMode(ScannedImageCompressMode mode)
设置用于优化扫描PDF文档中彩色/灰度图像的压缩模式。
foxit::Object
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:220
foxit::addon::optimization::ImageSettings::e_StretchNoSmooth
当设置此值时，表示拉伸时不进行任何插值。
Definition: fs_optimization.h:401
foxit::addon::optimization::OptimizerSettings::e_CleanUpUseFlateForNonEncodedStream
使用Flate编码未编码的流。
Definition: fs_optimization.h:917
foxit::addon::optimization::OptimizerSettings::e_OptimizerDiscardUserData
通过丢弃用户数据来优化PDF文档。
Definition: fs_optimization.h:905
foxit::addon::optimization::OptimizeScannedPDFSettings::e_ScannedImageCompressjpeg2000Lossy
压缩模式：JPEG2000有损。
Definition: fs_optimization.h:1283
fs_pdfdoc.h
PDF文档相关定义和类的头文件。
foxit::addon::optimization::AuditSpaceSize::acroforms
uint32 acroforms
AcroForm数据的总大小（以字节为单位）。
Definition: fs_optimization.h:143
foxit::addon::optimization::OptimizeScannedPDFSettings::SetOptimizedPages
void SetOptimizedPages(const common::Range &pages)
设置要优化的页面。
foxit::addon::optimization::OptimizeScannedPDFSettings::e_ScannedImageCompressjpeg2000LossLess
压缩模式：JPEG2000无损。
Definition: fs_optimization.h:1281
foxit::addon::optimization::MonoImageSettings::e_ImageCompressCCITT3
压缩模式：CCITT Group 3。
Definition: fs_optimization.h:608
foxit::WStringArray
Definition: fs_basictypes.h:227
foxit::addon::optimization::MonoImageSettings::SetStretchMode
void SetStretchMode(StretchMode mode)
设置用于优化PDF文档中单色图像的拉伸模式。
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsEmbeddedPrintSettings
丢弃嵌入的打印设置。
Definition: fs_optimization.h:949
foxit::addon::optimization::OptimizerSettings::e_DiscardUserDataLayer
丢弃隐藏图层内容并扁平化可见图层。
Definition: fs_optimization.h:988
foxit::addon::optimization::OptimizeScannedPDFSettings::e_ScannedMonoImageCompressjbig2Lossy
压缩模式：JBIG2有损。
Definition: fs_optimization.h:1293
foxit::addon::optimization::OptimizerSettings::e_DiscardUserDataFileAttchments
丢弃文件附件。
Definition: fs_optimization.h:984
foxit::addon::optimization::AuditSpaceSize::color_space
uint32 color_space
颜色空间定义的总大小（以字节为单位）。
Definition: fs_optimization.h:164
foxit::addon::optimization::OptimizerSettings::SetTransparencyMode
void SetTransparencyMode(TransparencyMode transparency_mode)
设置优化透明度模式。
foxit::addon::optimization::OptimizerSettings::SetUnembeddedFontSettings
void SetUnembeddedFontSettings(const UnembeddedFontSettings &settings)
设置取消嵌入字体的优化相关设置。
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsDetectAndMergeImageFragment
检测并合并图像片段。
Definition: fs_optimization.h:966
foxit::addon::optimization::Optimizer::Optimize
static common::Progressive Optimize(const pdf::PDFDoc &doc, const OptimizerSettings &settings, common::PauseCallback *pause)
使用指定的优化器设置优化给定的PDF文档。
foxit::addon::optimization::AuditSpaceSize::operator=
AuditSpaceSize & operator=(const AuditSpaceSize &data)
赋值操作符。
Definition: fs_optimization.h:73
foxit::addon::optimization::AuditSpaceSize::embed_files
uint32 embed_files
嵌入文件流的总大小（以字节为单位）。
Definition: fs_optimization.h:220
foxit::addon::optimization::AuditSpaceSize::bookmarks
uint32 bookmarks
书签数据的总大小（以字节为单位）。
Definition: fs_optimization.h:122
foxit::addon::optimization::AuditSpaceSize::extend_graphics_states
uint32 extend_graphics_states
扩展图形状态的总大小（以字节为单位）。
Definition: fs_optimization.h:199
foxit::addon::optimization::MonoImageSettings::operator==
bool operator==(const MonoImageSettings &other) const
相等操作符。
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsFormActions
丢弃所有表单提交、导入和重置操作。
Definition: fs_optimization.h:937
foxit::addon::optimization::MonoImageSettings::e_ImageCompressQualityLossless
压缩质量：无损。
Definition: fs_optimization.h:630
foxit::addon::optimization::AuditSpaceSize::images
uint32 images
嵌入图像的总大小（以字节为单位）。
Definition: fs_optimization.h:108
foxit::addon::optimization::OptimizerSettings::operator=
OptimizerSettings & operator=(const OptimizerSettings &other)
赋值操作符。
foxit::addon::optimization::Optimizer
Definition: fs_optimization.h:264
foxit::addon::optimization::UnembeddedFontSettings::operator!=
bool operator!=(const UnembeddedFontSettings &other) const
不等操作符。
foxit::addon::optimization::OptimizeScannedPDFSettings::~OptimizeScannedPDFSettings
~OptimizeScannedPDFSettings()
析构函数。
foxit::addon::optimization::AuditSpaceSize::comments_and_3d_contents
uint32 comments_and_3d_contents
注释和3D内容的总大小（以字节为单位）。
Definition: fs_optimization.h:185
foxit::addon::optimization::OptimizerSettings::SetDiscardObjectsOptions
void SetDiscardObjectsOptions(foxit::uint32 discard_objects_options)
设置丢弃对象的优化相关选项。
foxit::addon::optimization::OptimizerSettings::operator==
bool operator==(const OptimizerSettings &other) const
相等操作符。
foxit::addon::optimization::ImageSettings::e_StretchDefault
当设置此值时，表示进行默认拉伸。
Definition: fs_optimization.h:391
foxit::addon::optimization::UnembeddedFontSettings::UnembeddedFontSettings
UnembeddedFontSettings()
构造函数。
foxit::addon::optimization::MonoImageSettings::e_StretchDownsample
当设置此值时，表示在缩小或旋转时不进行半色调处理。
Definition: fs_optimization.h:658
foxit::addon::optimization::ImageSettings::e_StretchInterpol
当设置此值时，表示进行缩放插值。
Definition: fs_optimization.h:395
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:768
foxit::addon::optimization::OptimizerSettings::DiscardUserDataOptions
DiscardUserDataOptions
丢弃用户数据选项的枚举。
Definition: fs_optimization.h:976
foxit::addon::optimization::ImageSettings
Definition: fs_optimization.h:344
foxit::addon::optimization::OptimizeScannedPDFSettings
Definition: fs_optimization.h:1268
foxit::addon::optimization::MonoImageSettings::e_ImageCompressHigh
压缩模式：高压缩。
Definition: fs_optimization.h:612
foxit::addon::optimization::ImageCompressionCallback
Definition: fs_optimization.h:234
foxit::addon::optimization::OptimizeScannedPDFSettings::e_ScannedMonoImageCompressHigh
压缩模式：高压缩。
Definition: fs_optimization.h:1299
foxit::addon::optimization::MonoImageSettings::MonoImageSettings
MonoImageSettings()
构造函数。
foxit::addon::optimization::ImageSettings::e_ImageCompressjpeg2000
压缩模式：JPEG2000。
Definition: fs_optimization.h:357
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsJavaScriptActions
丢弃所有JavaScript操作。
Definition: fs_optimization.h:945
foxit::addon::optimization::ImageSettings::operator==
bool operator==(const ImageSettings &other) const
等于操作符。
foxit::addon::optimization::UnembeddedFontSettings::~UnembeddedFontSettings
~UnembeddedFontSettings()
析构函数。
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsFlattenFormFields
扁平化表单字段。
Definition: fs_optimization.h:939
foxit::addon::optimization::OptimizerSettings::e_DiscardUserAllData
丢弃标签用户数据。
Definition: fs_optimization.h:990
foxit::addon::optimization::OptimizerSettings::SetColorGrayImageSettings
void SetColorGrayImageSettings(const ImageSettings &settings)
设置彩色/灰度图像的优化相关设置。
foxit::addon::optimization::OptimizerSettings::SetDiscardUserDataOptions
void SetDiscardUserDataOptions(foxit::uint32 discard_userdata_options)
设置丢弃用户数据的优化相关选项。
foxit::addon::optimization::MonoImageSettings::e_StretchBicubic
当设置此值时，表示进行双三次插值缩放。
Definition: fs_optimization.h:660
foxit::addon::optimization::MonoImageSettings::SetImageDPILimit
void SetImageDPILimit(int dpi_limit)
设置单色图像的下限DPI值，以决定是否压缩PDF文档中的图像。
foxit::addon::optimization::OptimizerSettings::e_OptimizerUnembeddedFonts
通过取消嵌入某些嵌入字体来优化PDF文档。
Definition: fs_optimization.h:903
foxit::addon::optimization::AuditSpaceSize::piece_infos
uint32 piece_infos
片段信息的总大小（以字节为单位）。
Definition: fs_optimization.h:178
foxit::addon::optimization::ImageSettings::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::addon::optimization::OptimizerSettings::e_DiscardUserDataExternalCrossReferences
丢弃外部交叉引用。
Definition: fs_optimization.h:980
foxit::addon::optimization::ImageSettings::e_StretchBicubic
当设置此值时，表示进行双三次插值缩放。
Definition: fs_optimization.h:399
foxit::addon::optimization::MonoImageSettings::e_StretchInterpol
当设置此值时，表示进行缩放插值。
Definition: fs_optimization.h:656
foxit::addon::optimization::ImageSettings::e_ImageCompressQualityLossless
压缩质量：无损，仅适用于JPEG2000压缩模式。
Definition: fs_optimization.h:381
foxit::addon::optimization::ImageSettings::SetStretchMode
void SetStretchMode(StretchMode mode)
设置用于优化PDF文档中彩色/灰度图像的拉伸模式。
foxit::addon::optimization::OptimizerSettings::~OptimizerSettings
~OptimizerSettings()
析构函数。
foxit::addon::optimization::OptimizerSettings::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::addon::optimization::AuditSpaceSize::x_object_forms
uint32 x_object_forms
XObject表单的总大小（以字节为单位）。
Definition: fs_optimization.h:129
foxit::addon::optimization::ImageSettings::e_ImageCompressRetain
压缩模式：保持原样，即不压缩。
Definition: fs_optimization.h:359
foxit::addon::optimization::OptimizerSettings::e_CleanUpOptPageContent
清理页面内容，将内容流中的0A、0D更改为空格。
Definition: fs_optimization.h:927
foxit::addon::optimization::ImageSettings::SetImageDPILimit
void SetImageDPILimit(int dpi_limit)
设置彩色/灰度图像的下限DPI值，以决定是否在PDF文档中压缩图像。
foxit::addon::optimization::OptimizerSettings::e_DiscardUserDataAllAnnotsFormsAndMultimedia
丢弃所有注释、表单和多媒体。
Definition: fs_optimization.h:978
foxit::addon::optimization::OptimizerSettings::DiscardObjectsOptions
DiscardObjectsOptions
丢弃对象选项的枚举。
Definition: fs_optimization.h:935
foxit::addon::optimization::UnembeddedFontSettings
Definition: fs_optimization.h:802
foxit::addon::optimization::ImageSettings::ImageSettings
ImageSettings()
构造函数。
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsEmbeddedPageThumbnails
丢弃嵌入的页面缩略图。
Definition: fs_optimization.h:947
IFX_FileStream
文件流接口，用于读取和写入。
Definition: fx_stream.h:692
foxit::addon::optimization::ImageSettings::SetForegroundDownScale
void SetForegroundDownScale(int32 down_scale)
设置有损压缩模式的前景降采样值，用于优化PDF文档中的彩色图像。
foxit::addon::optimization::ImageSettings::e_ImageCompressQualityMinimum
压缩质量：最小。
Definition: fs_optimization.h:371
foxit::addon::optimization::MonoImageSettings::e_ImageCompressQualityMinimum
压缩质量：最小，仅适用于e_ImageCompressHigh压缩模式。
Definition: fs_optimization.h:634
foxit::addon::optimization::ImageSettings::operator !=
bool operator !=(const ImageSettings &other) const
不等于操作符。
foxit::addon::optimization::OptimizeScannedPDFSettings::operator=
OptimizeScannedPDFSettings & operator=(const OptimizeScannedPDFSettings &other)
赋值操作符。
foxit::addon::optimization::OptimizeScannedPDFSettings::SetColorGrayImageCompressionQuality
void SetColorGrayImageCompressionQuality(foxit::uint32 quality)
设置有损压缩模式的质量，用于优化扫描PDF文档中的彩色/灰度图像。
foxit::addon::optimization::UnembeddedFontSettings::operator==
bool operator==(const UnembeddedFontSettings &other) const
相等操作符。
foxit::addon::optimization::OptimizeScannedPDFSettings::SetMonoImageCompressionMode
void SetMonoImageCompressionMode(ScannedMonoImageCompressMode mode)
设置用于优化扫描PDF文档中单色图像的压缩模式。
foxit::addon::optimization::OptimizerSettings::e_OptimizerCompressImages
通过压缩图像来优化PDF文档。
Definition: fs_optimization.h:897
foxit::addon::optimization::MonoImageSettings::e_ImageCompressRetain
压缩模式：保持原样，即不压缩。
Definition: fs_optimization.h:616
foxit::addon::optimization::AuditSpaceSize
审计空间大小的结构，单位为字节类型。
Definition: fs_optimization.h:42
IFX_Pause
Definition: fx_basic.h:3737
foxit::addon::optimization::MonoImageSettings
Definition: fs_optimization.h:599
foxit::addon::optimization::MonoImageSettings::StretchMode
StretchMode
拉伸模式的枚举。
Definition: fs_optimization.h:650
foxit::addon::optimization::OptimizerSettings::operator !=
bool operator !=(const OptimizerSettings &other) const
不等操作符。
foxit::addon::optimization::OptimizerSettings::OptimizerOptions
OptimizerOptions
优化器选项的枚举。
Definition: fs_optimization.h:895
foxit::addon::optimization::AuditSpaceSize::content_streams
uint32 content_streams
所有页面内容流的总大小（以字节为单位）。
Definition: fs_optimization.h:101
foxit::common::Progressive
Definition: fs_common.h:373
foxit::addon::optimization::OptimizeScannedPDFSettings::ScannedImageCompressMode
ScannedImageCompressMode
用于彩色或灰度图像的压缩模式枚举。
Definition: fs_optimization.h:1275
foxit::addon::optimization::OptimizerSettings::e_OptimizerDiscardObjects
通过丢弃对象来优化PDF文档。
Definition: fs_optimization.h:901
foxit::addon::optimization::OptimizeScannedPDFSettings::e_ScannedImageCompressHigh
压缩模式：高压缩。
Definition: fs_optimization.h:1277
foxit::addon::optimization::AuditSpaceSize::web_infos
uint32 web_infos
Web相关元数据的总大小（以字节为单位）。
Definition: fs_optimization.h:227
foxit::addon::optimization::OptimizeScannedPDFSettings::e_ScannedImageCompressjpeg
压缩模式：JPEG。
Definition: fs_optimization.h:1279
foxit::uint32
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:195
foxit::addon::optimization::OptimizerSettings::e_TransparencyModeLowResolution
透明度模式: 低分辨率。
Definition: fs_optimization.h:1008
foxit::addon::optimization::ImageSettings::SetTextSensitivity
void SetTextSensitivity(int32 text_sensitivity)
设置有损压缩模式的文本敏感度，用于优化PDF文档中的彩色图像。
foxit::addon::optimization::ImageSettings::SetImageDPI
void SetImageDPI(int32 dpi)
设置DPI值作为压缩PDF文档中彩色/灰度图像的目标压缩值。
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsSmoothlinestocurves
将直线平滑为曲线。
Definition: fs_optimization.h:968
foxit::FS_HANDLE
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
foxit::addon::optimization::MonoImageSettings::e_StretchNoSmooth
当设置此值时，表示拉伸时不进行任何插值。
Definition: fs_optimization.h:662
foxit::addon::optimization::AuditSpaceSize::link_annots
uint32 link_annots
链接注释的总大小（以字节为单位）。
Definition: fs_optimization.h:150
foxit::addon::optimization::MonoImageSettings::e_ImageCompressQualityLossy
压缩质量：有损。
Definition: fs_optimization.h:632
fs_common.h
通用定义和类的头文件。
foxit::addon::optimization::Optimizer::ComputeAuditSpace
static AuditSpaceSize ComputeAuditSpace(const pdf::PDFDoc &doc)
计算审计空间。
foxit::addon::optimization::ImageSettings::operator=
ImageSettings & operator=(const ImageSettings &other)
赋值操作符。
foxit::addon::optimization::ImageSettings::e_ImageCompressjpeg
压缩模式：JPEG。
Definition: fs_optimization.h:355
foxit::addon::optimization::OptimizerSettings::e_OptimizerCleanUp
通过清理来优化PDF文档。
Definition: fs_optimization.h:899
foxit::addon::optimization::OptimizerSettings::e_CleanUpUseFlateInsteadOfLZW
在使用LZW编码的流中，改用Flate。
Definition: fs_optimization.h:919
foxit::addon::optimization::OptimizerSettings::SetOptimizerOptions
void SetOptimizerOptions(uint32 optimize_options)
设置选项以决定用于优化PDF文档的优化器设置类型。
foxit::addon::optimization::OptimizeScannedPDFSettings::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::addon::optimization::ImageCompressionCallback::GetTemporaryFileStream
virtual common::file::StreamCallback * GetTemporaryFileStream(const common::Bitmap &bitmap)=0
获取临时文件流。该文件流用于临时保存JPEG2000和JBIG2的编码结果。
foxit::addon::optimization::AuditSpaceSize::fonts
uint32 fonts
嵌入字体的总大小（以字节为单位）。
Definition: fs_optimization.h:115
foxit::addon::optimization::OptimizeScannedPDFSettings::operator==
bool operator==(const OptimizeScannedPDFSettings &other) const
相等操作符。
foxit::addon::optimization::ImageSettings::ImageCompressQuality
ImageCompressQuality
用于彩色或灰度图像的有损压缩质量枚举。
Definition: fs_optimization.h:369
foxit::addon::optimization::ImageSettings::SetCompressionMode
void SetCompressionMode(ImageCompressMode mode)
设置用于优化PDF文档中彩色/灰度图像的压缩模式。
foxit::addon::optimization::OptimizerSettings::e_CleanUpRemoveInvalidBookmarks
删除无效的书签。
Definition: fs_optimization.h:921
foxit::addon::optimization::OptimizerSettings::e_DiscardUserDataPrivateDataOfOtherApp
丢弃其他应用程序的私有数据。
Definition: fs_optimization.h:986
foxit::addon::optimization::MonoImageSettings::e_ImageCompressQualityLow
压缩质量：低，仅适用于e_ImageCompressHigh压缩模式。
Definition: fs_optimization.h:636
foxit::addon::optimization::ImageSettings::e_ImageCompressQualityMedium
压缩质量：中等。
Definition: fs_optimization.h:375
foxit::int32
FX_INT32 int32
有符号 32 位整数。
Definition: fs_basictypes.h:193
foxit::Base
Definition: fs_basictypes.h:465
foxit::addon::optimization::ImageSettings::SetBackgroundDownScale
void SetBackgroundDownScale(int32 down_scale)
设置有损压缩模式的背景降采样值，用于优化PDF文档中的彩色图像。
foxit::addon::optimization::OptimizerSettings::SetMonoImageSettings
void SetMonoImageSettings(const MonoImageSettings &settings)
设置单色图像的优化相关设置。
foxit::addon::optimization::ImageSettings::e_ImageCompressQualityHigh
压缩质量：高。
Definition: fs_optimization.h:377
fs_pdfpage.h
PDF页面相关定义和类的头文件。
foxit::addon::optimization::AuditSpaceSize::AuditSpaceSize
AuditSpaceSize()
构造函数。
Definition: fs_optimization.h:45
foxit::addon::optimization::AuditSpaceSize::pattern_infos
uint32 pattern_infos
图案对象的总大小（以字节为单位）。
Definition: fs_optimization.h:171
foxit::addon::optimization::Optimizer::StartSubsetEmbedFont
static common::Progressive StartSubsetEmbedFont(const pdf::PDFDoc &doc, common::PauseCallback *pause)
开始为给定PDF文档中的嵌入字体制作子集。
foxit::addon::optimization::UnembeddedFontSettings::SetSubsetAllEmFonts
void SetSubsetAllEmFonts(bool is_subset_all_emb_fonts)
设置是否包括所有非嵌入字体的子集。
foxit::addon::optimization::UnembeddedFontSettings::SetUnembeddedFontNameArray
void SetUnembeddedFontNameArray(const WStringArray &font_name_array)
设置字体名称数组以指定要取消嵌入的字体。
foxit::addon::optimization::OptimizerSettings::e_TransparencyModeMediumResolution
透明度模式: 中分辨率。
Definition: fs_optimization.h:1018
foxit::addon::optimization::MonoImageSettings::MonoImageCompressQuality
MonoImageCompressQuality
用于单色图像的压缩质量枚举。
Definition: fs_optimization.h:628
foxit::addon::optimization::MonoImageSettings::e_StretchOff
当设置此值时，表示不进行拉伸。
Definition: fs_optimization.h:654
foxit
Foxit命名空间。
Definition: fs_taggedpdf.h:27
foxit::addon::optimization::OptimizerSettings::e_OptimizerTransparency
通过处理透明效果来优化 PDF 文档。
Definition: fs_optimization.h:907
foxit::addon::optimization::OptimizerSettings::SetGrayscaleImageSettings
void SetGrayscaleImageSettings(const ImageSettings &settings)
设置灰度图像的优化相关设置。
foxit::addon::optimization::MonoImageSettings::operator !=
bool operator !=(const MonoImageSettings &other) const
不等操作符。
foxit::addon::optimization::ImageSettings::StretchMode
StretchMode
拉伸模式的枚举。
Definition: fs_optimization.h:389
foxit::addon::optimization::MonoImageSettings::e_StretchDefault
当设置此值时，表示进行默认拉伸。
Definition: fs_optimization.h:652
foxit::addon::optimization::OptimizerSettings
Definition: fs_optimization.h:888
foxit::addon::optimization::OptimizeScannedPDFSettings::e_ScannedMonoImageCompressjbig2LossLess
压缩模式：JBIG2无损。
Definition: fs_optimization.h:1295
foxit::addon::optimization::ImageSettings::e_StretchDownsample
当设置此值时，表示在缩小或旋转时不进行半色调处理。
Definition: fs_optimization.h:397
foxit::addon::optimization::MonoImageSettings::SetImageDPI
void SetImageDPI(int32 dpi)
设置DPI值作为压缩PDF文档中单色图像的目标压缩值。
foxit::addon::optimization::ImageSettings::e_ImageCompressQualityMaximum
压缩质量：最大。
Definition: fs_optimization.h:379
foxit::addon::optimization::AuditSpaceSize::named_destnations
uint32 named_destnations
命名目标的总大小（以字节为单位）。
Definition: fs_optimization.h:157
foxit::addon::optimization::OptimizerSettings::SetCleanUpOptions
void SetCleanUpOptions(foxit::uint32 clean_up_options)
设置清理的优化相关选项。
foxit::addon::optimization::MonoImageSettings::e_ImageCompressjbig2
压缩模式：JBIG2。
Definition: fs_optimization.h:614
foxit::addon::optimization::Optimizer::OptimizeScannedPDF
static common::Progressive OptimizeScannedPDF(const pdf::PDFDoc &doc, const OptimizeScannedPDFSettings &settings, ImageCompressionCallback *image_compress_callback, common::PauseCallback *pause)
使用指定的优化器设置优化扫描的PDF文档。
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsBookmarks
丢弃书签。
Definition: fs_optimization.h:951
foxit::addon::optimization::ImageSettings::SetTileSize
void SetTileSize(int size)
设置JPEG2000压缩模式的瓦片大小，用于优化PDF文档中的彩色/灰度图像。
foxit::addon::optimization::AuditSpaceSize::shading_pattern_infos
uint32 shading_pattern_infos
着色图案信息的总大小（以字节为单位）。
Definition: fs_optimization.h:192
foxit::addon::optimization::ImageSettings::ImageCompressMode
ImageCompressMode
用于彩色或灰度图像的压缩模式枚举。
Definition: fs_optimization.h:351
foxit::addon::optimization::OptimizeScannedPDFSettings::e_ScannedMonoImageCompressCCITT4
压缩模式：CCITT Group 4。
Definition: fs_optimization.h:1297
foxit::addon::optimization::ImageSettings::e_StretchOff
当设置此值时，表示不进行拉伸。
Definition: fs_optimization.h:393
foxit::addon::optimization::OptimizerSettings::e_DiscardUserDataDocumentInfoAndMetaData
丢弃文档信息和元数据。
Definition: fs_optimization.h:982
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsDocumentTags
丢弃文档标签。
Definition: fs_optimization.h:962
foxit::addon::optimization::MonoImageSettings::~MonoImageSettings
~MonoImageSettings()
析构函数。
foxit::addon::optimization::AuditSpaceSize::thumbs
uint32 thumbs
页面缩略图的总大小（以字节为单位）。
Definition: fs_optimization.h:213
foxit::addon::optimization::MonoImageSettings::operator=
MonoImageSettings & operator=(const MonoImageSettings &other)
赋值操作符。
foxit::addon::optimization::OptimizerSettings::OptimizerSettings
OptimizerSettings()
构造函数。
foxit::addon::optimization::MonoImageSettings::e_ImageCompressRunLength
压缩模式：行程编码。
Definition: fs_optimization.h:618
foxit::addon::optimization::ImageCompressionCallback::Release
virtual void Release()=0
用于释放当前回调对象本身的回调函数。
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsAlternateImages
丢弃所有替代图像。
Definition: fs_optimization.h:960
foxit::addon::optimization::MonoImageSettings::SetQuality
void SetQuality(MonoImageCompressQuality quality)
设置压缩质量，用于优化PDF文档中的单色图像。
foxit::addon::optimization::MonoImageSettings::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::addon::optimization::AuditSpaceSize::structure_infos
uint32 structure_infos
结构信息的总大小（以字节为单位）。
Definition: fs_optimization.h:136
foxit::addon::optimization::ImageSettings::~ImageSettings
~ImageSettings()
析构函数。
foxit::addon::optimization::AuditSpaceSize::cross_ref_tables
uint32 cross_ref_tables
交叉引用表的总大小（以字节为单位）。
Definition: fs_optimization.h:206
foxit::addon::optimization::OptimizerSettings::CleanUpOptions
CleanUpOptions
清理选项的枚举。
Definition: fs_optimization.h:915
foxit::addon::optimization::UnembeddedFontSettings::operator=
UnembeddedFontSettings & operator=(const UnembeddedFontSettings &other)
赋值操作符。
foxit::addon::optimization::ImageSettings::SetQuality
void SetQuality(ImageCompressQuality quality)
设置有损压缩模式的质量，用于优化PDF文档中的彩色/灰度图像。
foxit::addon::optimization::OptimizerSettings::e_CleanUpRemoveInvalidLinks
删除无效的链接。
Definition: fs_optimization.h:923
foxit::addon::optimization::MonoImageSettings::e_ImageCompressQualityMaximum
压缩质量：最大，仅适用于e_ImageCompressHigh压缩模式。
Definition: fs_optimization.h:642
foxit::addon::optimization::OptimizerSettings::e_DiscardObjectsEmbeddedSearchIndex
丢弃嵌入的搜索索引。
Definition: fs_optimization.h:964
foxit::addon::optimization::OptimizerSettings::TransparencyMode
TransparencyMode
透明度模式的枚举。
Definition: fs_optimization.h:998
foxit::addon::optimization::ImageSettings::e_ImageCompressHigh
压缩模式：高压缩。
Definition: fs_optimization.h:353
foxit::addon::optimization::OptimizeScannedPDFSettings::operator !=
bool operator !=(const OptimizeScannedPDFSettings &other) const
不等操作符。