Foxit PDF SDK
fs_common.h
浏览该文件的文档.
1 
15 #ifndef FS_COMMON_H_
16 #define FS_COMMON_H_
17 
18 #include "common/fs_basictypes.h"
19 #include "common/file/fs_file.h"
20 
26 namespace foxit {
27 class ActionCallback;
28 namespace common {
29 class DocEventCallback;
30 class FontMapperCallback;
31 class Color;
32 } // namespace common
33 namespace pdf {
34 namespace annots {
36 } // namespace annots
37 class PDFDoc;
38 class SignatureCallback;
39 class SecurityCallback;
40 class TimeStampCallback;
41 } // namespace pdf
42 namespace addon {
43 namespace xfa {
44 class AppProviderCallback;
45 } // namespace xfa
46 } // namespace addon
47 
51 namespace common {
57 typedef enum _Rotation {
68 } Rotation;
69 
76 typedef enum _RotationPointOptions {
88 
94 typedef enum _Alignment {
101 } Alignment;
102 
108 typedef enum _FillMode {
121 } FillMode;
122 
128 typedef enum _Position {
147 } Position;
148 
154 typedef enum _ModuleName {
197 } ModuleName;
198 
204 typedef enum _ColorSpaceType {
236 
242 typedef enum _LocaleID {
261 } LocaleID;
262 
268 typedef enum _FileFormatType {
286 
287 
288 #define CommonDefines foxit::common
289 
295 class Codec FS_FINAL : public Base {
296  public:
305  static String Base64Encode(const void* data_buffer, size_t length);
306 
315  static String Base64Decode(const void* encoded_data_buffer, size_t length);
316 
325  static String FlateCompress(const void* data_buffer, size_t length);
326 
335  static String FlateDecompress(const void* compressed_data_buffer, size_t length);
336 };
337 
347  public:
353  virtual void Release() = 0;
354 
367  virtual void OnOutOfMemory() = 0;
368 
369  protected:
370  ~NotifierCallback() {}
371 };
372 
377 class Progressive FS_FINAL : public Base {
378  public:
384  typedef enum _State {
386  e_Error = 0,
391  } State;
392 
398  Progressive(const Progressive& other);
400  ~Progressive();
401 
409  Progressive& operator = (const Progressive& other);
410 
419  State Continue();
420 
427  int GetRateOfProgress();
428 
429  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
430  explicit Progressive(FS_HANDLE handle = NULL);
431 };
436 class RenderConfig FS_FINAL : public Object {
437  public:
445 
448 
456  RenderConfig& operator = (const RenderConfig& render_config) {
458  return *this;
459  }
460 
468  bool operator == (const RenderConfig& render_config) const {
470  return true;
471  return false;
472  }
473 
481  bool operator != (const RenderConfig& render_config) const {
483  return true;
484  return false;
485  }
486 
496  this->graphics_objs_count_in_one_step = graphics_objs_count_in_one_step;
497  }
498 
512 };
513 
530 class Library FS_FINAL : public Object {
531  public:
548  static ErrorCode Initialize(const char* sn, const char* key);
549 
550 #if !defined(_SWIG_ANDROID_) && !defined(_SWIG_IOS_) && !defined(_SWIG_JAVA_) && !defined(_SWIG_DOTNET_) && !defined(_SWIG_MACOC_) && !defined(_SWIG_PYTHON_) && !defined(_SWIG_NODEJS_) && !defined(_SWIG_GO_)
551 
568 #if _FX_OS_ == _FX_IOS_ || _FX_OS_ == _FX_ANDROID_
569  static ErrorCode InitializeWithAppName(const char* sn, const char* key, const char* app_name);
570 #endif
571 #endif
572 
594  static ErrorCode Initialize(const char* sn, const char* key, bool is_optimize_memory, bool enable_js_xfa_threadsafety = false);
595 
607  static ErrorCode Reinitialize();
608 
618  static void Release();
619 
634  static bool HasModuleLicenseRight(common::ModuleName module_name);
635 
641  static String GetVersion();
642 
654  static bool SetCacheSize(uint32 size);
655 
667  static bool EnableJavaScript(bool enable_javascript);
668 
669 #ifndef __EMSCRIPTEN_RENDER__
670 
691  static bool SetAnnotIconProviderCallback(pdf::annots::IconProviderCallback* annot_icon_provider);
692 #endif
693 
705  static bool SetNotifierCallback(NotifierCallback* notifier);
706 
720  static bool SetActionCallback(ActionCallback* action_callback);
721 
730  static bool SetDocEventCallback(DocEventCallback* callback);
731 
766  static bool RegisterSignatureCallback(const char* filter, const char* sub_filter,
767  pdf::SignatureCallback* signature_callback);
768 
790  static void UnregisterSignatureCallback(const char* filter, const char* sub_filter);
791 
826  static bool RegisterSecurityCallback(const char* filter, pdf::SecurityCallback* callback);
827 
846  static bool UnregisterSecurityCallback(const char* filter);
847 
867  static bool SetTimeStampCallback(pdf::TimeStampCallback* timestamp_callback);
868 
869  #ifndef _FX_NO_XFA_
870 
888 
889  #endif
890 
900  static void SetRenderTextGamma(float gamma);
901 
912  static void* Alloc(size_t size);
913 
921  static void Free(void* ptr);
922 
934  static void* Realloc(void* ptr, size_t new_size);
935 
946  static void SetLogFile(const char* log_file_path);
947 
958  static void SetLogFile(const wchar_t* log_file_path);
959 
970  static void SetLogFile(foxit::common::file::StreamCallback* log_file);
971 
977  static foxit::ErrorCode FlushLog();
978 
990  static bool SetFontMapperCallback(FontMapperCallback* callback);
991 
1005  static void SetDefaultICCProfilesPath(const wchar_t* icc_profile_folder_path);
1006 
1012  static RenderConfig GetRenderConfig();
1013 
1021  static void SetRenderConfig(const RenderConfig& render_config);
1022 
1039  static void EnableThreadSafety(bool is_enable_thread_safety);
1040 
1041 #if defined(_WIN32) || defined(_WIN64)|| defined(__linux__)
1042 
1058  static ErrorCode InitializeOFDEngine(const char* ofd_library_path);
1059 
1068  static void ReleaseOFDEngine();
1069 #endif
1070 
1078  static WString ExecuteJavaScript(const wchar_t* java_script);
1079 
1087  static bool AddExternalFontPath(const wchar_t* font_path);
1088 
1097  static void MatchExternalFontsOnly(bool only_match);
1098 
1099  private:
1100  Library(const Library&);
1101  Library& operator = (const Library&);
1102 };
1104 class GraphState FS_FINAL : public Object {
1105  public:
1112  typedef enum _LineCapStyle {
1128  } LineCapStyle;
1129 
1136  typedef enum _LineJoinStyle {
1154  } LineJoinStyle;
1155 
1156 
1172  this->line_width = line_width;
1173  this->line_join = line_join;
1174  this->miter_limit = miter_limit;
1175  this->line_cap = line_cap;
1176  this->dash_phase = dash_phase;
1177  this->dashes = dashes;
1178  }
1179 
1182  : line_width(1.0f)
1184  , miter_limit(10*1.0f)
1186  , dash_phase(0) {}
1187 
1193  GraphState(const GraphState& state) {
1194  this->line_width = state.line_width;
1195  this->line_join = state.line_join;
1196  this->miter_limit = state.miter_limit;
1197  this->line_cap = state.line_cap;
1198  this->dash_phase = state.dash_phase;
1199  this->dashes = state.dashes;
1200  }
1201 
1210  this->line_width = state.line_width;
1211  this->line_join = state.line_join;
1212  this->miter_limit = state.miter_limit;
1213  this->line_cap = state.line_cap;
1214  this->dash_phase = state.dash_phase;
1215  this->dashes = state.dashes;
1216  return *this;
1217  }
1218 
1235  const FloatArray& dashes) {
1236  this->line_width = line_width;
1237  this->line_join = line_join;
1238  this->miter_limit = miter_limit;
1239  this->line_cap = line_cap;
1240  this->dash_phase = dash_phase;
1241  this->dashes = dashes;
1242  }
1243 
1250  float line_width;
1277 
1279  float dash_phase;
1280 
1285 };
1286 
1293 
1300  public:
1306  virtual void Release() = 0;
1307 
1313  virtual void OnDocWillOpen() {}
1314 
1325  virtual void OnDocOpened(const pdf::PDFDoc& document, ErrorCode error_code) {}
1326 
1334  virtual void OnDocWillDestroy(const pdf::PDFDoc& document) {}
1335 
1343  virtual void OnDocWillSave(const pdf::PDFDoc& document) {}
1344 
1355  virtual void OnDocSaved(const pdf::PDFDoc& document, ErrorCode error_code) {}
1356 
1357  protected:
1358  ~DocEventCallback() {}
1359 };
1360 
1368 class Range FS_FINAL : public Base {
1369  public:
1375  typedef enum _Filter {
1377  e_All = 0,
1379  e_Even = 1,
1381  e_Odd = 2
1382  } Filter;
1383 
1385  Range();
1386 
1392  explicit Range(int index);
1393 
1406  explicit Range(int start_index, int end_index, Filter filter = e_All);
1407 
1413  Range(const Range& other);
1414 
1416  ~Range();
1417 
1425  Range& operator = (const Range& other);
1426 
1434  bool operator == (const Range& other) const;
1435 
1443  bool operator != (const Range& other) const;
1444 
1452  bool IsEmpty() const;
1453 
1459  void AddSingle( int index );
1460 
1475  void AddSegment( int start_index, int end_index, Filter filter = e_All );
1476 
1482  int GetSegmentCount() const;
1483 
1492  int GetSegmentStart(int segment_index) const;
1493 
1502  int GetSegmentEnd(int segment_index) const;
1503 
1509  void RemoveAll();
1510 
1511  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1512  explicit Range(FS_HANDLE handle);
1513 };
1514 
1523 class Font FS_FINAL : public Base {
1524  public:
1530  typedef enum _Styles {
1534  e_StyleSerif = 0x0002,
1538  e_StyleScript = 0x0008,
1542  e_StyleItalic = 0x0040,
1544  e_StyleAllCap = 0x10000,
1546  e_StylesSmallCap = 0x20000,
1548  e_StylesBold = 0x40000
1549  } Styles;
1550 
1556  typedef enum _Charset {
1587  } Charset;
1588 
1594  typedef enum _CIDCharset {
1607  } CIDCharset;
1608 
1614  typedef enum _StandardID {
1643  } StandardID;
1644 
1650  typedef enum _FontTypes {
1659  } FontTypes;
1660 
1673  Font(const wchar_t* name, uint32 styles, Charset charset, int weight);
1674 
1681  explicit Font(StandardID font_id);
1682 
1692  Font(const char* font_file_path, int face_index, Charset charset);
1693 
1703  Font(const wchar_t* font_file_path, int face_index, Charset charset);
1704 
1712 
1713  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1714  explicit Font(FS_HANDLE handle = NULL);
1715 
1721  Font(const Font& other);
1722 
1730  Font& operator = (const Font& other);
1731 
1739  bool operator == (const Font& other) const;
1740 
1748  bool operator != (const Font& other) const;
1749 
1757  bool IsEmpty() const;
1758 
1760  ~Font();
1761 
1767  WString GetName();
1768 
1775 
1781  bool IsBold() const;
1782 
1788  bool IsItalic() const;
1789 
1797  bool IsEmbedded(const pdf::PDFDoc& document);
1798 
1807  bool IsSupportEmbedded(const pdf::PDFDoc& document);
1808 
1821  Font Embed(pdf::PDFDoc document, bool is_add_all_unicodes = true);
1822 
1833  UInt32Array AddUnicodes(const pdf::PDFDoc& document, const UInt32Array& unicode_array);
1834 
1835 #ifdef _FONT_GETWOFFDATA_
1836 
1843  String GetWoffData(pdf::PDFDoc document);
1844 #endif
1845 
1851  int GetAscent() const;
1852 
1858  int GetDescent() const;
1859 
1867  RectI GetCharBBox(uint32 unicode) const;
1868 
1876  float GetCharWidth(uint32 unicode) const;
1877 
1886  RectI GetCharBBox(foxit::uint32 unicode,const foxit::pdf::PDFDoc& document);
1887 
1896  float GetCharWidth(foxit::uint32 unicode,const foxit::pdf::PDFDoc& document);
1897 
1906  foxit::uint32 GetStyles(const pdf::PDFDoc& document);
1907 
1919  CIDCharset GetCIDCharset(const pdf::PDFDoc& document);
1920 
1928  bool IsStandardFont(const pdf::PDFDoc& document);
1929 
1941  StandardID GetStandard14Font(const pdf::PDFDoc& document);
1942 
1951  FontTypes GetFontType(const pdf::PDFDoc& document);
1952 
1960  String GetBaseFontName(const pdf::PDFDoc& document);
1961 
1970  bool IsVertWriting(const pdf::PDFDoc& document);
1971 
1980  String GetEncoding(const pdf::PDFDoc& document);
1981 
1993  bool SetEncoding(const pdf::PDFDoc& document, const char* value);
1994 
2003  bool IsCharSupported(foxit::uint32 unicode, const pdf::PDFDoc& document) const;
2004 
2014  int GetGlyphID(foxit::uint32 unicode, const pdf::PDFDoc& document) const;
2015 };
2016 
2020 class FontMapResult FS_FINAL : public Object {
2021  public:
2024 
2039  this->file_read = file_read;
2040  this->face_index = face_index;
2041  }
2042 
2049  this->file_read = other.file_read;
2050  this->face_index = other.face_index;
2051  }
2052 
2061  this->file_read = other.file_read;
2062  this->face_index = other.face_index;
2063  return *this;
2064  }
2065 
2073  bool operator == (const FontMapResult& other) const {
2074  if (this->file_read != other.file_read || this->face_index != other.face_index)
2075  return false;
2076  return true;
2077  }
2078 
2086  bool operator != (const FontMapResult& other) const {
2087  return !(*this == other);
2088  }
2089 
2104  this->file_read = file_read;
2105  this->face_index = face_index;
2106  }
2107 
2123 };
2124 
2134  public:
2140  virtual void Release() = 0;
2141 
2158  virtual FontMapResult MapFont(const char* font_name, bool is_truetype, uint32 styles,
2159  int weight, int italic_angle, Font::Charset charset) = 0;
2160 
2174  virtual StringArray MapFont(const char* font_family_name, Font::Charset charset,
2175  uint32 styles, int weight, int italic_angle) = 0;
2176 
2177  protected:
2178  ~FontMapperCallback() {}
2179 };
2180 
2182 class Path FS_FINAL : public Base {
2183  public:
2189  typedef enum _PointType {
2208  } PointType;
2209 
2211  Path();
2213  ~Path();
2219  Path(const Path& other);
2227  Path& operator=(const Path& other);
2235  bool operator ==(const Path& other) const;
2243  bool operator != (const Path& other) const;
2244 
2252  bool IsEmpty() const;
2253 
2259  int GetPointCount();
2260 
2269  PointF GetPoint(int index);
2270 
2280  PointType GetPointType(int index);
2281 
2293  bool SetPoint(int index, const PointF& point, PointType type);
2294 
2305  bool MoveTo(const PointF& point);
2306 
2316  bool LineTo(const PointF& point);
2317 
2330  bool CubicBezierTo(const PointF& point1, const PointF& point2, const PointF& point3);
2331 
2351  bool CloseFigure();
2352 
2361  bool RemovePoint(int index);
2362 
2370  bool AppendRect(const RectF& rect);
2371 
2379  bool AppendEllipse(const RectF& rect);
2380 
2388  void Transform(const Matrix& matrix);
2394  void Clear();
2395 
2408  void IncreasePointCount(int count);
2409 
2410  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2411  explicit Path(FS_HANDLE handle);
2412 };
2413 
2415 FSDK_DEFINE_ARRAY(PathArray, Path)
2416 
2417 
2420 class ColorSpace FS_FINAL : public Base {
2421  public:
2429  typedef enum _RenderingIntent {
2431  e_RenderIntentPerceptual = 0,
2433  e_RenderIntentRelColorimetric = 1,
2435  e_RenderIntentSaturation = 2,
2437  e_RenderIntentAbsColorimetric = 3
2438  } RenderingIntent;
2439 
2440 
2441  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2442  explicit ColorSpace(FS_HANDLE handle);
2443 
2454  ~ColorSpace();
2455 
2461  ColorSpace(const ColorSpace& other);
2462 
2470  ColorSpace& operator=(const ColorSpace& other);
2471 
2480  bool operator==(const ColorSpace& other) const;
2481 
2490  bool operator!=(const ColorSpace& other) const;
2491 
2499  bool IsEmpty() const;
2500 
2508  int GetComponentCount() const;
2509 
2516  foxit::common::ColorSpaceType GetColorSpaceType() const;
2517 
2523  bool IsSpotColorSpace() const;
2524 
2541  StringArray GetComponentNames() const;
2542 
2551  Color ConvertColor(const Color& color);
2552 
2563  Color ConvertColor(int r_value, int g_value, int b_value);
2564 
2576  Color ConvertColor(int c_value, int m_value, int y_value, int k_value);
2577 };
2578 
2582 class Color FS_FINAL : public Base {
2583  public:
2584  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2585  explicit Color(FS_HANDLE handle);
2586 
2588  Color();
2594  explicit Color(const ColorSpace& color_space);
2596  ~Color();
2597 
2603  Color(const Color& other);
2604 
2612  Color& operator=(const Color& other);
2613 
2621  bool operator==(const Color& other) const;
2622 
2630  bool operator!=(const Color& other) const;
2631 
2639  bool IsEmpty() const;
2640 
2647 
2657  FloatArray GetValue() const;
2658 
2671  void SetValue(const FloatArray& component_array);
2672 
2681 
2690 };
2691 
2692 } // namespace common
2693 } // namespace foxit
2694 
2695 #endif // FS_COMMON_H_
2696 
CID字体字符集:Adobe-CNS1。
Definition: fs_common.h:1600
File format类型:XFDF。
Definition: fs_common.h:272
Definition: fs_annot.h:1677
字体样式:非符号字体。
Definition: fs_common.h:1540
bool IsVertWriting(const pdf::PDFDoc &document)
检查当前字体是否为垂直书写。
FontMapResult()
构造函数。
Definition: fs_common.h:2023
表示从前一个点到当前点绘制一条直线, 并且该点还将连接到此点之前最近的 Path::e_TypeMoveTo 点,以便闭合当前图形。
Definition: fs_common.h:2199
斜接线条连接类型。
Definition: fs_common.h:1141
模块"优化器"的名称。
Definition: fs_common.h:170
Styles
字体样式的枚举。
Definition: fs_common.h:1530
LineCapStyle line_cap
线端点样式。
Definition: fs_common.h:1276
Color & operator=(const Color &other)
赋值操作符。
标准字体:Helvetica-Bold。
Definition: fs_common.h:1626
字体字符集:韩文(Wansung)。
Definition: fs_common.h:1566
颜色空间:Separation。
Definition: fs_common.h:222
斜角线条连接类型。
Definition: fs_common.h:1153
FloatArray dashes
表示虚线模式的虚线数组。此数组中每个元素的值不应为负数。
Definition: fs_common.h:1284
颜色空间:ICCBased。
Definition: fs_common.h:220
static WString ExecuteJavaScript(const wchar_t *java_script)
执行javascript。
bool IsCharSupported(foxit::uint32 unicode, const pdf::PDFDoc &document) const
检查当前字体是否支持某字符。
位置:中心。
Definition: fs_common.h:138
字体字符集:日文(Shift-JIS)。
Definition: fs_common.h:1564
Definition: fs_common.h:1368
bool AppendEllipse(const RectF &rect)
向当前路径的末尾添加椭圆图形。
基于矩形的左上角点旋转文本块。
Definition: fs_common.h:80
标准字体:Times-Bold。
Definition: fs_common.h:1634
static void SetRenderTextGamma(float gamma)
设置文本渲染的伽马值。
static bool SetTimeStampCallback(pdf::TimeStampCallback *timestamp_callback)
设置 pdf::TimeStampCallback 对象到Foxit PDF SDK,以帮助与时间戳服务器交互。
交替填充模式,系统在每条扫描线上填充奇数和偶数 多边形边之间的区域。
Definition: fs_common.h:115
CID字体字符集:未知。
Definition: fs_common.h:1596
static void Release()
释放Foxit PDF SDK库分配的所有资源。
int GetRateOfProgress()
获取当前进度的比率。
RotationPointOptions
旋转点选项的枚举。
Definition: fs_common.h:76
位置:右下。
Definition: fs_common.h:146
Definition: fs_common.h:295
Color ConvertToCMYK(ColorSpace::RenderingIntent intent=ColorSpace::e_RenderIntentRelColorimetric) const
转换为CMYK颜色。
Position
PDF页面中水印位置枚举。
Definition: fs_common.h:128
Definition: fs_common.h:2020
Color ConvertToRGB(ColorSpace::RenderingIntent intent=ColorSpace::e_RenderIntentRelColorimetric) const
转换为RGB颜色。
投影方形端盖。描边在路径端点之外继续延伸等于 线宽一半的距离,并被切断。
Definition: fs_common.h:1127
Definition: fs_common.h:2420
bool IsStandardFont(const pdf::PDFDoc &document)
检查当前字体是否为标准字体。
PointType GetPointType(int index)
获取由索引指定的点的类型。
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:220
IFX_Pause PauseCallback
Definition: fs_common.h:1292
颜色空间:CalGray。(1个分量,A)
Definition: fs_common.h:214
模块"高级编辑"的名称。
Definition: fs_common.h:182
CID字体字符集:Adobe-Japan1。
Definition: fs_common.h:1602
Definition: fs_common.h:530
圆角线条连接类型。
Definition: fs_common.h:1147
地区语言环境ID:台湾。
Definition: fs_common.h:248
virtual FontMapResult MapFont(const char *font_name, bool is_truetype, uint32 styles, int weight, int italic_angle, Font::Charset charset)=0
(此函数将在未来被弃用。建议使用返回 StringArray 的 FontMapperCallback::MapFont 。) 用于根据输入参数映射合适字体的回调函数。
模块"3D"的名称。
Definition: fs_common.h:186
标准字体:Times-BoldItalic。
Definition: fs_common.h:1636
GraphState(float line_width, LineJoinStyle line_join, float miter_limit, LineCapStyle line_cap, float dash_phase, const FloatArray &dashes)
带参数的构造函数。
Definition: fs_common.h:1170
Definition: fs_common.h:436
基于矩形的右上角点旋转文本块。
Definition: fs_common.h:82
Font(const wchar_t *name, uint32 styles, Charset charset, int weight)
带有给定属性的构造函数。
未知旋转。
Definition: fs_common.h:67
渲染意图:相对色度的。
Definition: fs_common.h:2433
模块"MD2PDF"的名称
Definition: fs_common.h:196
bool IsBold() const
判断当前字体是否为粗体。
static bool SetFontMapperCallback(FontMapperCallback *callback)
设置 FontMapperCallback 对象到Foxit PDF SDK。
static String Base64Encode(const void *data_buffer, size_t length)
使用Base64算法编码源数据缓冲区。
bool operator==(const Color &other) const
相等操作符。
bool operator !=(const Path &other) const
不相等操作符。
颜色空间:DeviceGray。(1个分量,灰度)
Definition: fs_common.h:208
LocaleID
语言环境ID枚举。
Definition: fs_common.h:242
只使用范围内的奇数(丢弃偶数)。
Definition: fs_common.h:1381
模块"PDF2Office"的名称。
Definition: fs_common.h:184
void Set(float line_width, LineJoinStyle line_join, float miter_limit, LineCapStyle line_cap, float dash_phase, const FloatArray &dashes)
设置值。
Definition: fs_common.h:1234
Range & operator=(const Range &other)
赋值操作符。
PointF GetPoint(int index)
获取由索引指定的点。
File format类型:XDP。
Definition: fs_common.h:276
模块"PDF2MD"的名称
Definition: fs_common.h:194
bool CloseFigure()
关闭当前图形(也是当前路径中的最后一个图形)。
颜色空间:Indexed。
Definition: fs_common.h:226
圆头端盖。在端点周围绘制一个直径等于线宽的半圆弧 并填充。
Definition: fs_common.h:1122
CID字体字符集:Adobe-GB1。
Definition: fs_common.h:1598
bool operator !=(const FontMapResult &other) const
不相等操作符。
Definition: fs_common.h:2086
国家语言环境ID:韩国。
Definition: fs_common.h:258
Definition: fx_coordinates.h:30
static bool RegisterSignatureCallback(const char *filter, const char *sub_filter, pdf::SignatureCallback *signature_callback)
向Foxit PDF SDK注册第三方 pdf::SignatureCallback 对象用于签名和验证签名, 以及回调的过滤器和子过滤器名称。
顺时针旋转 180 度。
Definition: fs_common.h:63
模块"OCR"的名称。
Definition: fs_common.h:164
bool IsSupportEmbedded(const pdf::PDFDoc &document)
检查当前字体是否支持嵌入到指定的PDF文档中。
CID字体字符集:Unicode。
Definition: fs_common.h:1606
void SetValue(const FloatArray &component_array)
设置分量值数组。
RenderingIntent
渲染意图枚举。
Definition: fs_common.h:2429
bool MoveTo(const PointF &point)
向当前路径的末尾添加一个点,以开始新的图形。
int GetGlyphID(foxit::uint32 unicode, const pdf::PDFDoc &document) const
根据字符获取字形ID。
字体样式:全大写。
Definition: fs_common.h:1544
Filter
范围过滤器枚举。
Definition: fs_common.h:1375
File format类型:FDF。
Definition: fs_common.h:270
语言环境ID:未指定,在未指定语言环境时使用。
Definition: fs_common.h:244
~Font()
析构函数。
void IncreasePointCount(int count)
增加点数量并为这些新点准备足够的内存。
int GetSegmentCount() const
获取范围段的数量。
文件操作相关定义和函数的头文件。
bool operator==(const Range &other) const
相等操作符。
文件读取接口。
Definition: fx_stream.h:587
颜色空间:DeviceRGB。(3个分量,R、G、B)
Definition: fs_common.h:210
void Clear()
清除所有点。
FloatArray GetValue() const
获取分量值数组。
CIDCharset
CID字体字符集枚举。
Definition: fs_common.h:1594
地区语言环境ID:香港。
Definition: fs_common.h:246
宽字符串类
Definition: fx_string.h:1457
static void EnableThreadSafety(bool is_enable_thread_safety)
启用线程安全。
GraphState(const GraphState &state)
使用另一个图形状态对象的构造函数。
Definition: fs_common.h:1193
State
进度状态的枚举。
Definition: fs_common.h:384
(保留,目前不提供此模块)模块"布局识别"的名称。
Definition: fs_common.h:174
字体类型:TrueType。
Definition: fs_common.h:1654
static void RegisterXFAAppProviderCallback(addon::xfa::AppProviderCallback *callback)
向Foxit PDF SDK注册 addon::xfa::AppProviderCallback 对象。
标准字体:Helvetica。
Definition: fs_common.h:1624
位置:右上。
Definition: fs_common.h:134
Definition: fs_common.h:1299
国家语言环境ID:法国。
Definition: fs_common.h:252
FileFormatType
文件格式类型枚举。
Definition: fs_common.h:268
foxit::common::file::ReaderCallback * file_read
由用户实现的 common::file::ReaderCallback 对象。Foxit PDF SDK将使用此 回调对象来读取映射字体的数据。如果这是 NULL,意味着没有映射字体。
Definition: fs_common.h:2112
表示该点是图形的第一个点。
Definition: fs_common.h:2191
bool operator==(const FontMapResult &other) const
相等操作符。
Definition: fs_common.h:2073
LineCapStyle
线条端盖样式枚举。
Definition: fs_common.h:1112
字体样式:手写字体。
Definition: fs_common.h:1538
国家语言环境ID:德国。
Definition: fs_common.h:254
static ErrorCode Reinitialize()
重新初始化Foxit PDF SDK库。
国家语言环境ID:日本。
Definition: fs_common.h:260
static bool RegisterSecurityCallback(const char *filter, pdf::SecurityCallback *callback)
向Foxit PDF SDK注册 pdf::SecurityCallback 对象用于解密具有特殊加密过滤器的PDF。
Definition: fs_pdfdoc.h:768
static bool SetCacheSize(uint32 size)
设置PDF库缓存大小的上限。
颜色空间:DeviceCMYK。(4个分量,C、M、Y、K)
Definition: fs_common.h:212
bool IsEmpty() const
检查当前对象是否为空。
static void ReleaseOFDEngine()
释放OFD引擎。
Definition: fs_common.h:2582
static ErrorCode Initialize(const char *sn, const char *key)
使用有效的许可证信息初始化Foxit PDF SDK库。
模块"DWG2PDF"的名称。
Definition: fs_common.h:180
foxit::uint32 GetStyles(const pdf::PDFDoc &document)
获取字体样式。
字体样式:斜体。
Definition: fs_common.h:1542
颜色空间:ICCBased DeviceCMYK。(4个分量,C、M、Y、K)
Definition: fs_common.h:234
Definition: fs_common.h:2415
FontMapResult(const FontMapResult &other)
使用另一个字体映射结果对象的构造函数。
Definition: fs_common.h:2048
Progressive(const Progressive &other)
使用另一个progressive对象的构造函数。
Definition: fs_common.h:2133
FontTypes
字体类型的枚举。
Definition: fs_common.h:1650
static bool SetAnnotIconProviderCallback(pdf::annots::IconProviderCallback *annot_icon_provider)
设置自定义的 pdf::annots::IconProviderCallback 对象到Foxit PDF SDK。
进度状态:进度需要继续。
Definition: fs_common.h:388
GraphState()
构造函数。
Definition: fs_common.h:1181
位置:下中。
Definition: fs_common.h:144
bool IsEmbedded(const pdf::PDFDoc &document)
判断当前字体是否嵌入在指定的PDF文档中。
static void SetRenderConfig(const RenderConfig &render_config)
设置渲染配置。
int GetSegmentEnd(int segment_index) const
获取指定范围段的结束索引。
Definition: fs_signature.h:1407
File format类型:HTML。
Definition: fs_common.h:274
void Transform(const Matrix &matrix)
使用给定矩阵变换当前路径中的所有点。
(保留,目前不提供此模块)模块"ConnectedPDF"的名称。
Definition: fs_common.h:156
~Progressive()
析构函数。
bool operator!=(const Color &other) const
不相等操作符。
String GetEncoding(const pdf::PDFDoc &document)
获取当前字体编码。
bool operator==(const char *str1, const CFX_ByteString &str2)
检查两个字节字符串是否相等。
Definition: fs_basictypes.h:128
bool SetEncoding(const pdf::PDFDoc &document, const char *value)
设置当前字体编码。
模块"OFD"的名称。
Definition: fs_common.h:188
字体样式:衬线字体。
Definition: fs_common.h:1534
表示从前一个点到当前点绘制一条直线。
Definition: fs_common.h:2193
模块"转换"的名称。
Definition: fs_common.h:172
颜色空间:ICCBased DeviceGray。(1个分量,灰度)
Definition: fs_common.h:230
基本类型定义的头文件。
LineJoinStyle line_join
线连接样式
Definition: fs_common.h:1258
位置:左中。
Definition: fs_common.h:136
static void MatchExternalFontsOnly(bool only_match)
是否只匹配外部指定路径。
Definition: fs_actioncallback.h:2608
ColorSpaceType
颜色空间枚举。
Definition: fs_common.h:204
static void SetLogFile(const char *log_file_path)
设置日志文件路径。
ErrorCode
错误代码的枚举。
Definition: fs_basictypes.h:236
只使用范围内的偶数(丢弃奇数)。
Definition: fs_common.h:1379
virtual void OnDocSaved(const pdf::PDFDoc &document, ErrorCode error_code)
在PDF文档保存时触发。
Definition: fs_common.h:1355
字体字符集:繁体中文。
Definition: fs_common.h:1570
字体字符集:ANSI(美国、西欧)。
Definition: fs_common.h:1558
static String FlateDecompress(const void *compressed_data_buffer, size_t length)
使用DEFLATE算法解压缩压缩的数据缓冲区。
平头端盖。描边在路径的端点处被切断。路径末端之外 没有投影。
Definition: fs_common.h:1117
文件流接口,用于读取和写入。
Definition: fx_stream.h:692
位置:右中。
Definition: fs_common.h:140
virtual void Release()=0
用于释放当前回调对象本身的回调函数。
String GetBaseFontName(const pdf::PDFDoc &document)
获取基础字体名称。
int GetSegmentStart(int segment_index) const
获取指定范围段的起始索引。
字体字符集:标准符号。
Definition: fs_common.h:1562
颜色空间:ICCBased DeviceRGB。(3个分量,R、G、B)
Definition: fs_common.h:232
CIDCharset GetCIDCharset(const pdf::PDFDoc &document)
获取CID字体字符集。
字体样式:强制粗体。
Definition: fs_common.h:1548
FillMode
填充模式类型枚举,主要用于路径图形对象。
Definition: fs_common.h:108
static void * Realloc(void *ptr, size_t new_size)
重新分配内存块。
模块"合规"的名称。
Definition: fs_common.h:168
RenderConfig()
构造函数。
Definition: fs_common.h:447
bool IsEmpty() const
检查当前对象是否为空。
static bool HasModuleLicenseRight(common::ModuleName module_name)
检查用户是否有权在当前使用的许可证信息中使用Foxit PDF SDK的指定模块 (用于初始化Foxit PDF SDK)。
FontMapResult & operator=(const FontMapResult &other)
赋值操作符。
Definition: fs_common.h:2060
字体样式:符号字体。
Definition: fs_common.h:1536
bool IsEmpty() const
检查当前对象是否为空。
Definition: fx_basic.h:3737
Definition: fs_common.h:1104
int GetDescent() const
获取下降值,以1/1000 em大小为单位(PDF单位)。
bool CubicBezierTo(const PointF &point1, const PointF &point2, const PointF &point3)
通过三个点向当前图形的末尾添加三次贝塞尔样条: 两个控制点和一个目标点。
标准字体:Courier-BoldOblique,粗斜体。
Definition: fs_common.h:1620
virtual void Release()=0
用于释放当前回调对象自身的回调函数。
Definition: fs_common.h:2182
RenderConfig(int graphics_objs_count_in_one_step)
带参数的构造函数。
Definition: fs_common.h:444
bool operator==(const Path &other) const
相等操作符。
字体字符集:阿拉伯文。
Definition: fs_common.h:1584
LineJoinStyle
线条连接样式枚举。
Definition: fs_common.h:1136
Range()
构造函数。
static String FlateCompress(const void *data_buffer, size_t length)
使用DEFLATE算法压缩源数据缓冲区。
字体字符集:系统默认,用于未知或映射目的。
Definition: fs_common.h:1560
Definition: fs_common.h:377
float line_width
线宽。
Definition: fs_common.h:1250
环绕填充模式,系统使用图形绘制的方向来 确定是否填充区域。
Definition: fs_common.h:120
模块"XFA"的名称。
Definition: fs_common.h:158
国家语言环境ID:意大利。
Definition: fs_common.h:256
字体类型:CID 字体。
Definition: fs_common.h:1658
~Color()
析构函数。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:195
static void SetDefaultICCProfilesPath(const wchar_t *icc_profile_folder_path)
设置包含默认ICC配置文件的文件夹路径。
颜色空间:DeviceN。
Definition: fs_common.h:224
virtual void OnDocOpened(const pdf::PDFDoc &document, ErrorCode error_code)
在PDF文档打开时触发。
Definition: fs_common.h:1325
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
virtual void OnDocWillOpen()
在文档即将打开时触发。
Definition: fs_common.h:1313
static bool SetDocEventCallback(DocEventCallback *callback)
设置 DocEventCallback 对象到Foxit PDF SDK。
字体字符集:俄文。
Definition: fs_common.h:1576
bool SetPoint(int index, const PointF &point, PointType type)
更改由索引指定的点的值和类型。
static String Base64Decode(const void *encoded_data_buffer, size_t length)
使用Base64算法解码编码的数据缓冲区。
bool LineTo(const PointF &point)
向当前图形的末尾添加一个点,并从当前点到新点绘制一条线。
Definition: fs_signature.h:1812
Progressive & operator=(const Progressive &other)
赋值操作符。
static bool UnregisterSecurityCallback(const char *filter)
从Foxit PDF SDK中取消注册 pdf::SecurityCallback 对象。
int face_index
字体面索引。这是基于零的索引值:
Definition: fs_common.h:2122
~Path()
析构函数。
Definition: fx_coordinates.h:596
Color()
构造一个空的颜色对象。
模块"表格制作器"的名称。
Definition: fs_common.h:178
Alignment
对齐方式(水平)枚举。
Definition: fs_common.h:94
virtual void OnDocWillSave(const pdf::PDFDoc &document)
在PDF文档即将保存时触发。
Definition: fs_common.h:1343
static bool SetActionCallback(ActionCallback *action_callback)
设置 foxit::ActionCallback 对象到Foxit PDF SDK,以帮助执行PDF动作。
static bool EnableJavaScript(bool enable_javascript)
启用或禁用PDF的JavaScript。
State Continue()
继续渐进式处理过程。
~Range()
析构函数。
Definition: fs_basictypes.h:471
Definition: fs_basictypes.h:229
static foxit::ErrorCode FlushLog()
刷新日志文件。
bool operator==(const Font &other) const
相等操作符。
ModuleName
许可证信息中使用的模块名称枚举。
Definition: fs_common.h:154
字体类型:Type3。
Definition: fs_common.h:1656
标准字体:ZapfDingbats。
Definition: fs_common.h:1642
标准字体:Helvetica-Oblique,斜体。
Definition: fs_common.h:1630
Definition: fs_security.h:1058
void RemoveAll()
移除所有范围段。
int GetPointCount()
获取点的数量。
static String GetVersion()
获取当前Foxit PDF SDK库的版本。
表示该点是贝塞尔样条的结束点, 并且该点还将连接到此点之前最近的 Path::e_TypeMoveTo 点,以便闭合当前图形。
Definition: fs_common.h:2207
标准字体:Times-Roman。
Definition: fs_common.h:1632
bool operator !=(const Range &other) const
不相等操作符。
WString GetName()
检索PostScript名称。
标准字体:Symbol。
Definition: fs_common.h:1640
顺时针旋转 270 度。
Definition: fs_common.h:65
Font Embed(pdf::PDFDoc document, bool is_add_all_unicodes=true)
将当前字体嵌入到指定的PDF文档中。
位置:左下。
Definition: fs_common.h:142
字体样式:等宽字体。
Definition: fs_common.h:1532
字体字符集:简体中文。
Definition: fs_common.h:1568
颜色空间:Pattern。
Definition: fs_common.h:228
标准字体:Times-Italic。
Definition: fs_common.h:1638
Path()
构造函数。
Definition: fs_common.h:1523
颜色空间:Lab。(3个分量,A、B、C)
Definition: fs_common.h:218
模块"编辑"的名称。
Definition: fs_common.h:160
颜色空间:无效。
Definition: fs_common.h:206
填充模式:无。
Definition: fs_common.h:110
居中对齐。
Definition: fs_common.h:98
不旋转。
Definition: fs_common.h:59
static ErrorCode InitializeOFDEngine(const char *ofd_library_path)
初始化OFD引擎。
Rotation
旋转的枚举。
Definition: fs_common.h:57
FontTypes GetFontType(const pdf::PDFDoc &document)
获取字体类型。
Foxit 命名空间。
Definition: fs_accessibility.h:28
左对齐。
Definition: fs_common.h:96
颜色空间:CalRGB。(3个分量,A、B、C)
Definition: fs_common.h:216
Definition: fs_common.h:346
void AddSingle(int index)
添加索引作为新的范围段。
模块"比较"的名称。
Definition: fs_common.h:166
float dash_phase
虚线模式的虚线相位。
Definition: fs_common.h:1279
StandardID
标准字体ID枚举。
Definition: fs_common.h:1614
File format类型:XFD。
Definition: fs_common.h:280
范围内的所有索引都将被使用。
Definition: fs_common.h:1377
字节字符串类
Definition: fx_string.h:317
进度状态:进度已完成。
Definition: fs_common.h:390
字体字符集:希伯来文。
Definition: fs_common.h:1582
UInt32Array AddUnicodes(const pdf::PDFDoc &document, const UInt32Array &unicode_array)
向当前嵌入字体添加Unicode字符。
Charset
字体字符集枚举。
Definition: fs_common.h:1556
static void Free(void *ptr)
释放内存块
字体样式:小型大写。
Definition: fs_common.h:1546
字体字符集:希腊文。
Definition: fs_common.h:1578
字体类型:Type1。
Definition: fs_common.h:1652
模块"无障碍"的名称。
Definition: fs_common.h:176
static void UnregisterSignatureCallback(const char *filter, const char *sub_filter)
取消注册与特定过滤器和子过滤器关联的第三方 pdf::SignatureCallback 对象 从Foxit PDF SDK中。如果有可用的默认签名, 它将与其过滤器和子过滤器值一起恢复。
顺时针旋转 90 度。
Definition: fs_common.h:61
File format类型:XML。
Definition: fs_common.h:278
virtual void Release()=0
用于释放当前回调对象自身的回调函数。
float GetCharWidth(uint32 unicode) const
获取由Unicode指定的字符的宽度(以1/1000 em大小为单位(PDF单位))。
标准字体:Helvetica-BoldOblique,粗斜体。
Definition: fs_common.h:1628
static bool AddExternalFontPath(const wchar_t *font_path)
添加外部字体路径。
static void * Alloc(size_t size)
分配内存块
bool IsEmpty() const
检查当前对象是否为空。
字体字符集:波罗的海文。
Definition: fs_common.h:1586
标准字体:Courier。
Definition: fs_common.h:1616
GraphState & operator=(const GraphState &state)
赋值操作符。
Definition: fs_common.h:1209
基于中心点旋转文本块。
Definition: fs_common.h:78
字体字符集:土耳其文。
Definition: fs_common.h:1580
FontMapResult(foxit::common::file::ReaderCallback *file_read, int face_index)
带参数的构造函数。
Definition: fs_common.h:2038
基于矩形的左下角点旋转文本块。
Definition: fs_common.h:84
模块"Office2PDF"的名称。
Definition: fs_common.h:190
bool operator !=(const RenderConfig &render_config) const
不相等操作符。
Definition: fs_common.h:481
进度状态:发生任何错误。
Definition: fs_common.h:386
int graphics_objs_count_in_one_step
在渐进式渲染过程中一步中要渲染的图形对象数量。这应该是一个正值。
Definition: fs_common.h:511
#define NULL
空指针值。
Definition: fx_system.h:792
bool operator==(const RenderConfig &render_config) const
相等操作符。
Definition: fs_common.h:468
bool operator!=(const char *str1, const CFX_ByteString &str2)
检查两个字节字符串是否不相等。
Definition: fs_basictypes.h:140
virtual void OnDocWillDestroy(const pdf::PDFDoc &document)
在PDF文档即将销毁时触发。
Definition: fs_common.h:1334
void Set(int graphics_objs_count_in_one_step)
设置值。
Definition: fs_common.h:495
Definition: fx_coordinates.h:1076
模块"Print2PDF"的名称
Definition: fs_common.h:192
字体字符集:东欧。
Definition: fs_common.h:1574
Path & operator=(const Path &other)
赋值操作符。
StandardID GetStandard14Font(const pdf::PDFDoc &document)
获取标准字体ID。
RectI GetCharBBox(uint32 unicode) const
获取由Unicode指定的字符的边界框。
右对齐。
Definition: fs_common.h:100
int GetAscent() const
获取上升值,以1/1000 em大小为单位(PDF单位)。
表示该点是贝塞尔样条的控制点或结束点。
Definition: fs_common.h:2201
bool RemovePoint(int index)
移除由索引指定的点。
位置:左上。
Definition: fs_common.h:130
Font & operator=(const Font &other)
赋值操作符。
位置:上中。
Definition: fs_common.h:132
bool IsItalic() const
判断当前字体对象是否为斜体。
PointType
路径中点类型枚举。
Definition: fs_common.h:2189
ColorSpace GetColorSpace()
获取当前颜色所属的颜色空间。
标准字体:Courier-Oblique,斜体。
Definition: fs_common.h:1622
国家语言环境ID:荷兰。
Definition: fs_common.h:250
标准字体:Courier-Bold。
Definition: fs_common.h:1618
static RenderConfig GetRenderConfig()
获取渲染配置。
void AddSegment(int start_index, int end_index, Filter filter=e_All)
添加新的范围段。(反向排序是合法的。)
virtual void OnOutOfMemory()=0
用于通知应用程序Foxit PDF SDK内存不足时的回调函数。
File format类型:TXT。
Definition: fs_common.h:284
字体字符集:泰文。
Definition: fs_common.h:1572
CID字体字符集:Adobe-Korea1。
Definition: fs_common.h:1604
void Set(foxit::common::file::ReaderCallback *file_read, int face_index)
设置值。
Definition: fs_common.h:2103
File format类型:PDF。
Definition: fs_common.h:282
基于矩形的右下角点旋转文本块。
Definition: fs_common.h:86
String GetFamilyName()
检索字体族名称。
bool operator !=(const Font &other) const
不相等操作符。
static bool SetNotifierCallback(NotifierCallback *notifier)
设置 NotifierCallback 对象到Foxit PDF SDK。
模块"RMS"的名称。
Definition: fs_common.h:162
bool AppendRect(const RectF &rect)
向当前路径的末尾添加矩形图形。
Definition: fx_coordinates.h:771
float miter_limit
线连接的斜角限制。
Definition: fs_common.h:1268
RenderConfig & operator=(const RenderConfig &render_config)
赋值操作符。
Definition: fs_common.h:456