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 {
193 } ModuleName;
194 
200 typedef enum _ColorSpaceType {
232 
238 typedef enum _LocaleID {
257 } LocaleID;
258 
264 typedef enum _FileFormatType {
282 
283 
284 #define CommonDefines foxit::common
285 
291 class Codec FS_FINAL : public Base {
292  public:
301  static String Base64Encode(const void* data_buffer, size_t length);
302 
311  static String Base64Decode(const void* encoded_data_buffer, size_t length);
312 
321  static String FlateCompress(const void* data_buffer, size_t length);
322 
331  static String FlateDecompress(const void* compressed_data_buffer, size_t length);
332 };
333 
343  public:
349  virtual void Release() = 0;
350 
363  virtual void OnOutOfMemory() = 0;
364 
365  protected:
366  ~NotifierCallback() {}
367 };
368 
373 class Progressive FS_FINAL : public Base {
374  public:
380  typedef enum _State {
382  e_Error = 0,
387  } State;
388 
394  Progressive(const Progressive& other);
396  ~Progressive();
397 
405  Progressive& operator = (const Progressive& other);
406 
415  State Continue();
416 
423  int GetRateOfProgress();
424 
425  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
426  explicit Progressive(FS_HANDLE handle = NULL);
427 };
432 class RenderConfig FS_FINAL : public Object {
433  public:
441 
444 
452  RenderConfig& operator = (const RenderConfig& render_config) {
454  return *this;
455  }
456 
464  bool operator == (const RenderConfig& render_config) const {
466  return true;
467  return false;
468  }
469 
477  bool operator != (const RenderConfig& render_config) const {
479  return true;
480  return false;
481  }
482 
492  this->graphics_objs_count_in_one_step = graphics_objs_count_in_one_step;
493  }
494 
508 };
509 
526 class Library FS_FINAL : public Object {
527  public:
544  static ErrorCode Initialize(const char* sn, const char* key);
545 
546 #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_)
547 
564 #if _FX_OS_ == _FX_IOS_ || _FX_OS_ == _FX_ANDROID_
565  static ErrorCode InitializeWithAppName(const char* sn, const char* key, const char* app_name);
566 #endif
567 #endif
568 
590  static ErrorCode Initialize(const char* sn, const char* key, bool is_optimize_memory, bool enable_js_xfa_threadsafety = false);
591 
603  static ErrorCode Reinitialize();
604 
614  static void Release();
615 
630  static bool HasModuleLicenseRight(common::ModuleName module_name);
631 
637  static String GetVersion();
638 
650  static bool SetCacheSize(uint32 size);
651 
663  static bool EnableJavaScript(bool enable_javascript);
664 
665 #ifndef __EMSCRIPTEN_RENDER__
666 
687  static bool SetAnnotIconProviderCallback(pdf::annots::IconProviderCallback* annot_icon_provider);
688 #endif
689 
701  static bool SetNotifierCallback(NotifierCallback* notifier);
702 
716  static bool SetActionCallback(ActionCallback* action_callback);
717 
726  static bool SetDocEventCallback(DocEventCallback* callback);
727 
762  static bool RegisterSignatureCallback(const char* filter, const char* sub_filter,
763  pdf::SignatureCallback* signature_callback);
764 
786  static void UnregisterSignatureCallback(const char* filter, const char* sub_filter);
787 
822  static bool RegisterSecurityCallback(const char* filter, pdf::SecurityCallback* callback);
823 
842  static bool UnregisterSecurityCallback(const char* filter);
843 
863  static bool SetTimeStampCallback(pdf::TimeStampCallback* timestamp_callback);
864 
865  #ifndef _FX_NO_XFA_
866 
884 
885  #endif
886 
896  static void SetRenderTextGamma(float gamma);
897 
908  static void* Alloc(size_t size);
909 
917  static void Free(void* ptr);
918 
930  static void* Realloc(void* ptr, size_t new_size);
931 
942  static void SetLogFile(const char* log_file_path);
943 
954  static void SetLogFile(const wchar_t* log_file_path);
955 
966  static void SetLogFile(foxit::common::file::StreamCallback* log_file);
967 
973  static foxit::ErrorCode FlushLog();
974 
986  static bool SetFontMapperCallback(FontMapperCallback* callback);
987 
1001  static void SetDefaultICCProfilesPath(const wchar_t* icc_profile_folder_path);
1002 
1008  static RenderConfig GetRenderConfig();
1009 
1017  static void SetRenderConfig(const RenderConfig& render_config);
1018 
1035  static void EnableThreadSafety(bool is_enable_thread_safety);
1036 
1037 #if defined(_WIN32) || defined(_WIN64)|| defined(__linux__)
1038 
1054  static ErrorCode InitializeOFDEngine(const char* ofd_library_path);
1055 
1064  static void ReleaseOFDEngine();
1065 #endif
1066 
1074  static WString ExecuteJavaScript(const wchar_t* java_script);
1075 
1083  static bool AddExternalFontPath(const wchar_t* font_path);
1084 
1093  static void MatchExternalFontsOnly(bool only_match);
1094 
1095  private:
1096  Library(const Library&);
1097  Library& operator = (const Library&);
1098 };
1100 class GraphState FS_FINAL : public Object {
1101  public:
1108  typedef enum _LineCapStyle {
1124  } LineCapStyle;
1125 
1132  typedef enum _LineJoinStyle {
1150  } LineJoinStyle;
1151 
1152 
1168  this->line_width = line_width;
1169  this->line_join = line_join;
1170  this->miter_limit = miter_limit;
1171  this->line_cap = line_cap;
1172  this->dash_phase = dash_phase;
1173  this->dashes = dashes;
1174  }
1175 
1178  : line_width(1.0f)
1180  , miter_limit(10*1.0f)
1182  , dash_phase(0) {}
1183 
1189  GraphState(const GraphState& state) {
1190  this->line_width = state.line_width;
1191  this->line_join = state.line_join;
1192  this->miter_limit = state.miter_limit;
1193  this->line_cap = state.line_cap;
1194  this->dash_phase = state.dash_phase;
1195  this->dashes = state.dashes;
1196  }
1197 
1206  this->line_width = state.line_width;
1207  this->line_join = state.line_join;
1208  this->miter_limit = state.miter_limit;
1209  this->line_cap = state.line_cap;
1210  this->dash_phase = state.dash_phase;
1211  this->dashes = state.dashes;
1212  return *this;
1213  }
1214 
1231  const FloatArray& dashes) {
1232  this->line_width = line_width;
1233  this->line_join = line_join;
1234  this->miter_limit = miter_limit;
1235  this->line_cap = line_cap;
1236  this->dash_phase = dash_phase;
1237  this->dashes = dashes;
1238  }
1239 
1246  float line_width;
1273 
1275  float dash_phase;
1276 
1281 };
1282 
1289 
1296  public:
1302  virtual void Release() = 0;
1303 
1309  virtual void OnDocWillOpen() {}
1310 
1321  virtual void OnDocOpened(const pdf::PDFDoc& document, ErrorCode error_code) {}
1322 
1330  virtual void OnDocWillDestroy(const pdf::PDFDoc& document) {}
1331 
1339  virtual void OnDocWillSave(const pdf::PDFDoc& document) {}
1340 
1351  virtual void OnDocSaved(const pdf::PDFDoc& document, ErrorCode error_code) {}
1352 
1353  protected:
1354  ~DocEventCallback() {}
1355 };
1356 
1364 class Range FS_FINAL : public Base {
1365  public:
1371  typedef enum _Filter {
1373  e_All = 0,
1375  e_Even = 1,
1377  e_Odd = 2
1378  } Filter;
1379 
1381  Range();
1382 
1388  explicit Range(int index);
1389 
1402  explicit Range(int start_index, int end_index, Filter filter = e_All);
1403 
1409  Range(const Range& other);
1410 
1412  ~Range();
1413 
1421  Range& operator = (const Range& other);
1422 
1430  bool operator == (const Range& other) const;
1431 
1439  bool operator != (const Range& other) const;
1440 
1448  bool IsEmpty() const;
1449 
1455  void AddSingle( int index );
1456 
1471  void AddSegment( int start_index, int end_index, Filter filter = e_All );
1472 
1478  int GetSegmentCount() const;
1479 
1488  int GetSegmentStart(int segment_index) const;
1489 
1498  int GetSegmentEnd(int segment_index) const;
1499 
1505  void RemoveAll();
1506 
1507  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1508  explicit Range(FS_HANDLE handle);
1509 };
1510 
1519 class Font FS_FINAL : public Base {
1520  public:
1526  typedef enum _Styles {
1530  e_StyleSerif = 0x0002,
1534  e_StyleScript = 0x0008,
1538  e_StyleItalic = 0x0040,
1540  e_StyleAllCap = 0x10000,
1542  e_StylesSmallCap = 0x20000,
1544  e_StylesBold = 0x40000
1545  } Styles;
1546 
1552  typedef enum _Charset {
1583  } Charset;
1584 
1590  typedef enum _CIDCharset {
1603  } CIDCharset;
1604 
1610  typedef enum _StandardID {
1639  } StandardID;
1640 
1646  typedef enum _FontTypes {
1655  } FontTypes;
1656 
1669  Font(const wchar_t* name, uint32 styles, Charset charset, int weight);
1670 
1677  explicit Font(StandardID font_id);
1678 
1688  Font(const char* font_file_path, int face_index, Charset charset);
1689 
1699  Font(const wchar_t* font_file_path, int face_index, Charset charset);
1700 
1708 
1709  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1710  explicit Font(FS_HANDLE handle = NULL);
1711 
1717  Font(const Font& other);
1718 
1726  Font& operator = (const Font& other);
1727 
1735  bool operator == (const Font& other) const;
1736 
1744  bool operator != (const Font& other) const;
1745 
1753  bool IsEmpty() const;
1754 
1756  ~Font();
1757 
1763  WString GetName();
1764 
1771 
1777  bool IsBold() const;
1778 
1784  bool IsItalic() const;
1785 
1793  bool IsEmbedded(const pdf::PDFDoc& document);
1794 
1803  bool IsSupportEmbedded(const pdf::PDFDoc& document);
1804 
1817  Font Embed(pdf::PDFDoc document, bool is_add_all_unicodes = true);
1818 
1829  UInt32Array AddUnicodes(const pdf::PDFDoc& document, const UInt32Array& unicode_array);
1830 
1831 #ifdef _FONT_GETWOFFDATA_
1832 
1839  String GetWoffData(pdf::PDFDoc document);
1840 #endif
1841 
1847  int GetAscent() const;
1848 
1854  int GetDescent() const;
1855 
1863  RectI GetCharBBox(uint32 unicode) const;
1864 
1872  float GetCharWidth(uint32 unicode) const;
1873 
1882  RectI GetCharBBox(foxit::uint32 unicode,const foxit::pdf::PDFDoc& document);
1883 
1892  float GetCharWidth(foxit::uint32 unicode,const foxit::pdf::PDFDoc& document);
1893 
1902  foxit::uint32 GetStyles(const pdf::PDFDoc& document);
1903 
1915  CIDCharset GetCIDCharset(const pdf::PDFDoc& document);
1916 
1924  bool IsStandardFont(const pdf::PDFDoc& document);
1925 
1937  StandardID GetStandard14Font(const pdf::PDFDoc& document);
1938 
1947  FontTypes GetFontType(const pdf::PDFDoc& document);
1948 
1956  String GetBaseFontName(const pdf::PDFDoc& document);
1957 
1966  bool IsVertWriting(const pdf::PDFDoc& document);
1967 
1976  String GetEncoding(const pdf::PDFDoc& document);
1977 
1989  bool SetEncoding(const pdf::PDFDoc& document, const char* value);
1990 
1999  bool IsCharSupported(foxit::uint32 unicode, const pdf::PDFDoc& document) const;
2000 };
2001 
2005 class FontMapResult FS_FINAL : public Object {
2006  public:
2009 
2024  this->file_read = file_read;
2025  this->face_index = face_index;
2026  }
2027 
2034  this->file_read = other.file_read;
2035  this->face_index = other.face_index;
2036  }
2037 
2046  this->file_read = other.file_read;
2047  this->face_index = other.face_index;
2048  return *this;
2049  }
2050 
2058  bool operator == (const FontMapResult& other) const {
2059  if (this->file_read != other.file_read || this->face_index != other.face_index)
2060  return false;
2061  return true;
2062  }
2063 
2071  bool operator != (const FontMapResult& other) const {
2072  return !(*this == other);
2073  }
2074 
2089  this->file_read = file_read;
2090  this->face_index = face_index;
2091  }
2092 
2108 };
2109 
2119  public:
2125  virtual void Release() = 0;
2126 
2143  virtual FontMapResult MapFont(const char* font_name, bool is_truetype, uint32 styles,
2144  int weight, int italic_angle, Font::Charset charset) = 0;
2145 
2159  virtual StringArray MapFont(const char* font_family_name, Font::Charset charset,
2160  uint32 styles, int weight, int italic_angle) = 0;
2161 
2162  protected:
2163  ~FontMapperCallback() {}
2164 };
2165 
2167 class Path FS_FINAL : public Base {
2168  public:
2174  typedef enum _PointType {
2193  } PointType;
2194 
2196  Path();
2198  ~Path();
2204  Path(const Path& other);
2212  Path& operator=(const Path& other);
2220  bool operator ==(const Path& other) const;
2228  bool operator != (const Path& other) const;
2229 
2237  bool IsEmpty() const;
2238 
2244  int GetPointCount();
2245 
2254  PointF GetPoint(int index);
2255 
2265  PointType GetPointType(int index);
2266 
2278  bool SetPoint(int index, const PointF& point, PointType type);
2279 
2290  bool MoveTo(const PointF& point);
2291 
2301  bool LineTo(const PointF& point);
2302 
2315  bool CubicBezierTo(const PointF& point1, const PointF& point2, const PointF& point3);
2316 
2336  bool CloseFigure();
2337 
2346  bool RemovePoint(int index);
2347 
2355  bool AppendRect(const RectF& rect);
2356 
2364  bool AppendEllipse(const RectF& rect);
2365 
2373  void Transform(const Matrix& matrix);
2379  void Clear();
2380 
2393  void IncreasePointCount(int count);
2394 
2395  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2396  explicit Path(FS_HANDLE handle);
2397 };
2398 
2400 FSDK_DEFINE_ARRAY(PathArray, Path)
2401 
2402 
2405 class ColorSpace FS_FINAL : public Base {
2406  public:
2414  typedef enum _RenderingIntent {
2416  e_RenderIntentPerceptual = 0,
2418  e_RenderIntentRelColorimetric = 1,
2420  e_RenderIntentSaturation = 2,
2422  e_RenderIntentAbsColorimetric = 3
2423  } RenderingIntent;
2424 
2425 
2426  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2427  explicit ColorSpace(FS_HANDLE handle);
2428 
2439  ~ColorSpace();
2440 
2446  ColorSpace(const ColorSpace& other);
2447 
2455  ColorSpace& operator=(const ColorSpace& other);
2456 
2465  bool operator==(const ColorSpace& other) const;
2466 
2475  bool operator!=(const ColorSpace& other) const;
2476 
2484  bool IsEmpty() const;
2485 
2493  int GetComponentCount() const;
2494 
2501  foxit::common::ColorSpaceType GetColorSpaceType() const;
2502 
2508  bool IsSpotColorSpace() const;
2509 
2526  StringArray GetComponentNames() const;
2527 
2536  Color ConvertColor(const Color& color);
2537 
2548  Color ConvertColor(int r_value, int g_value, int b_value);
2549 
2561  Color ConvertColor(int c_value, int m_value, int y_value, int k_value);
2562 };
2563 
2567 class Color FS_FINAL : public Base {
2568  public:
2569  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
2570  explicit Color(FS_HANDLE handle);
2571 
2573  Color();
2579  explicit Color(const ColorSpace& color_space);
2581  ~Color();
2582 
2588  Color(const Color& other);
2589 
2597  Color& operator=(const Color& other);
2598 
2606  bool operator==(const Color& other) const;
2607 
2615  bool operator!=(const Color& other) const;
2616 
2624  bool IsEmpty() const;
2625 
2632 
2642  FloatArray GetValue() const;
2643 
2656  void SetValue(const FloatArray& component_array);
2657 
2666 
2675 };
2676 
2677 } // namespace common
2678 } // namespace foxit
2679 
2680 #endif // FS_COMMON_H_
2681 
CID字体字符集:Adobe-CNS1。
Definition: fs_common.h:1596
File format类型:XFDF。
Definition: fs_common.h:268
Definition: fs_annot.h:1674
字体样式:非符号字体。
Definition: fs_common.h:1536
bool IsVertWriting(const pdf::PDFDoc &document)
检查当前字体是否为垂直书写。
FontMapResult()
构造函数。
Definition: fs_common.h:2008
表示从前一个点到当前点绘制一条直线, 并且该点还将连接到此点之前最近的 Path::e_TypeMoveTo 点,以便闭合当前图形。
Definition: fs_common.h:2184
斜接线条连接类型。
Definition: fs_common.h:1137
模块"优化器"的名称。
Definition: fs_common.h:170
Styles
字体样式的枚举。
Definition: fs_common.h:1526
LineCapStyle line_cap
线端点样式。
Definition: fs_common.h:1272
Color & operator=(const Color &other)
赋值操作符。
标准字体:Helvetica-Bold。
Definition: fs_common.h:1622
字体字符集:韩文(Wansung)。
Definition: fs_common.h:1562
颜色空间:Separation。
Definition: fs_common.h:218
斜角线条连接类型。
Definition: fs_common.h:1149
FloatArray dashes
表示虚线模式的虚线数组。此数组中每个元素的值不应为负数。
Definition: fs_common.h:1280
颜色空间:ICCBased。
Definition: fs_common.h:216
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:1560
Definition: fs_common.h:1364
bool AppendEllipse(const RectF &rect)
向当前路径的末尾添加椭圆图形。
基于矩形的左上角点旋转文本块。
Definition: fs_common.h:80
标准字体:Times-Bold。
Definition: fs_common.h:1630
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:1592
static void Release()
释放Foxit PDF SDK库分配的所有资源。
int GetRateOfProgress()
获取当前进度的比率。
RotationPointOptions
旋转点选项的枚举。
Definition: fs_common.h:76
位置:右下。
Definition: fs_common.h:146
Definition: fs_common.h:291
Color ConvertToCMYK(ColorSpace::RenderingIntent intent=ColorSpace::e_RenderIntentRelColorimetric) const
转换为CMYK颜色。
Position
PDF页面中水印位置枚举。
Definition: fs_common.h:128
Definition: fs_common.h:2005
Color ConvertToRGB(ColorSpace::RenderingIntent intent=ColorSpace::e_RenderIntentRelColorimetric) const
转换为RGB颜色。
投影方形端盖。描边在路径端点之外继续延伸等于 线宽一半的距离,并被切断。
Definition: fs_common.h:1123
Definition: fs_common.h:2405
bool IsStandardFont(const pdf::PDFDoc &document)
检查当前字体是否为标准字体。
PointType GetPointType(int index)
获取由索引指定的点的类型。
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:221
IFX_Pause PauseCallback
Definition: fs_common.h:1288
颜色空间:CalGray。(1个分量,A)
Definition: fs_common.h:210
模块"高级编辑"的名称。
Definition: fs_common.h:182
CID字体字符集:Adobe-Japan1。
Definition: fs_common.h:1598
Definition: fs_common.h:526
圆角线条连接类型。
Definition: fs_common.h:1143
地区语言环境ID:台湾。
Definition: fs_common.h:244
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:1632
GraphState(float line_width, LineJoinStyle line_join, float miter_limit, LineCapStyle line_cap, float dash_phase, const FloatArray &dashes)
带参数的构造函数。
Definition: fs_common.h:1166
Definition: fs_common.h:432
基于矩形的右上角点旋转文本块。
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:2418
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:204
LocaleID
语言环境ID枚举。
Definition: fs_common.h:238
只使用范围内的奇数(丢弃偶数)。
Definition: fs_common.h:1377
模块"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:1230
Range & operator=(const Range &other)
赋值操作符。
PointF GetPoint(int index)
获取由索引指定的点。
File format类型:XDP。
Definition: fs_common.h:272
bool CloseFigure()
关闭当前图形(也是当前路径中的最后一个图形)。
颜色空间:Indexed。
Definition: fs_common.h:222
圆头端盖。在端点周围绘制一个直径等于线宽的半圆弧 并填充。
Definition: fs_common.h:1118
CID字体字符集:Adobe-GB1。
Definition: fs_common.h:1594
bool operator !=(const FontMapResult &other) const
不相等操作符。
Definition: fs_common.h:2071
国家语言环境ID:韩国。
Definition: fs_common.h:254
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:1602
void SetValue(const FloatArray &component_array)
设置分量值数组。
RenderingIntent
渲染意图枚举。
Definition: fs_common.h:2414
bool MoveTo(const PointF &point)
向当前路径的末尾添加一个点,以开始新的图形。
字体样式:全大写。
Definition: fs_common.h:1540
Filter
范围过滤器枚举。
Definition: fs_common.h:1371
File format类型:FDF。
Definition: fs_common.h:266
语言环境ID:未指定,在未指定语言环境时使用。
Definition: fs_common.h:240
~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:206
void Clear()
清除所有点。
FloatArray GetValue() const
获取分量值数组。
CIDCharset
CID字体字符集枚举。
Definition: fs_common.h:1590
地区语言环境ID:香港。
Definition: fs_common.h:242
宽字符串类
Definition: fx_string.h:1457
static void EnableThreadSafety(bool is_enable_thread_safety)
启用线程安全。
GraphState(const GraphState &state)
使用另一个图形状态对象的构造函数。
Definition: fs_common.h:1189
State
进度状态的枚举。
Definition: fs_common.h:380
(保留,目前不提供此模块)模块"布局识别"的名称。
Definition: fs_common.h:174
字体类型:TrueType。
Definition: fs_common.h:1650
static void RegisterXFAAppProviderCallback(addon::xfa::AppProviderCallback *callback)
向Foxit PDF SDK注册 addon::xfa::AppProviderCallback 对象。
标准字体:Helvetica。
Definition: fs_common.h:1620
位置:右上。
Definition: fs_common.h:134
Definition: fs_common.h:1295
国家语言环境ID:法国。
Definition: fs_common.h:248
FileFormatType
文件格式类型枚举。
Definition: fs_common.h:264
foxit::common::file::ReaderCallback * file_read
由用户实现的 common::file::ReaderCallback 对象。Foxit PDF SDK将使用此 回调对象来读取映射字体的数据。如果这是 NULL,意味着没有映射字体。
Definition: fs_common.h:2097
表示该点是图形的第一个点。
Definition: fs_common.h:2176
bool operator==(const FontMapResult &other) const
相等操作符。
Definition: fs_common.h:2058
LineCapStyle
线条端盖样式枚举。
Definition: fs_common.h:1108
字体样式:手写字体。
Definition: fs_common.h:1534
国家语言环境ID:德国。
Definition: fs_common.h:250
static ErrorCode Reinitialize()
重新初始化Foxit PDF SDK库。
国家语言环境ID:日本。
Definition: fs_common.h:256
static bool RegisterSecurityCallback(const char *filter, pdf::SecurityCallback *callback)
向Foxit PDF SDK注册 pdf::SecurityCallback 对象用于解密具有特殊加密过滤器的PDF。
Definition: fs_pdfdoc.h:771
static bool SetCacheSize(uint32 size)
设置PDF库缓存大小的上限。
颜色空间:DeviceCMYK。(4个分量,C、M、Y、K)
Definition: fs_common.h:208
bool IsEmpty() const
检查当前对象是否为空。
static void ReleaseOFDEngine()
释放OFD引擎。
Definition: fs_common.h:2567
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:1538
颜色空间:ICCBased DeviceCMYK。(4个分量,C、M、Y、K)
Definition: fs_common.h:230
Definition: fs_common.h:2400
FontMapResult(const FontMapResult &other)
使用另一个字体映射结果对象的构造函数。
Definition: fs_common.h:2033
Progressive(const Progressive &other)
使用另一个progressive对象的构造函数。
Definition: fs_common.h:2118
FontTypes
字体类型的枚举。
Definition: fs_common.h:1646
static bool SetAnnotIconProviderCallback(pdf::annots::IconProviderCallback *annot_icon_provider)
设置自定义的 pdf::annots::IconProviderCallback 对象到Foxit PDF SDK。
进度状态:进度需要继续。
Definition: fs_common.h:384
GraphState()
构造函数。
Definition: fs_common.h:1177
位置:下中。
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:270
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:1530
表示从前一个点到当前点绘制一条直线。
Definition: fs_common.h:2178
模块"转换"的名称。
Definition: fs_common.h:172
颜色空间:ICCBased DeviceGray。(1个分量,灰度)
Definition: fs_common.h:226
基本类型定义的头文件。
LineJoinStyle line_join
线连接样式
Definition: fs_common.h:1254
位置:左中。
Definition: fs_common.h:136
static void MatchExternalFontsOnly(bool only_match)
是否只匹配外部指定路径。
Definition: fs_actioncallback.h:2608
ColorSpaceType
颜色空间枚举。
Definition: fs_common.h:200
static void SetLogFile(const char *log_file_path)
设置日志文件路径。
ErrorCode
错误代码的枚举。
Definition: fs_basictypes.h:237
只使用范围内的偶数(丢弃奇数)。
Definition: fs_common.h:1375
virtual void OnDocSaved(const pdf::PDFDoc &document, ErrorCode error_code)
在PDF文档保存时触发。
Definition: fs_common.h:1351
字体字符集:繁体中文。
Definition: fs_common.h:1566
字体字符集:ANSI(美国、西欧)。
Definition: fs_common.h:1554
static String FlateDecompress(const void *compressed_data_buffer, size_t length)
使用DEFLATE算法解压缩压缩的数据缓冲区。
平头端盖。描边在路径的端点处被切断。路径末端之外 没有投影。
Definition: fs_common.h:1113
文件流接口,用于读取和写入。
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:1558
颜色空间:ICCBased DeviceRGB。(3个分量,R、G、B)
Definition: fs_common.h:228
CIDCharset GetCIDCharset(const pdf::PDFDoc &document)
获取CID字体字符集。
字体样式:强制粗体。
Definition: fs_common.h:1544
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:443
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:2045
字体样式:符号字体。
Definition: fs_common.h:1532
bool IsEmpty() const
检查当前对象是否为空。
Definition: fx_basic.h:3737
Definition: fs_common.h:1100
int GetDescent() const
获取下降值,以1/1000 em大小为单位(PDF单位)。
bool CubicBezierTo(const PointF &point1, const PointF &point2, const PointF &point3)
通过三个点向当前图形的末尾添加三次贝塞尔样条: 两个控制点和一个目标点。
标准字体:Courier-BoldOblique,粗斜体。
Definition: fs_common.h:1616
virtual void Release()=0
用于释放当前回调对象自身的回调函数。
Definition: fs_common.h:2167
RenderConfig(int graphics_objs_count_in_one_step)
带参数的构造函数。
Definition: fs_common.h:440
bool operator==(const Path &other) const
相等操作符。
字体字符集:阿拉伯文。
Definition: fs_common.h:1580
LineJoinStyle
线条连接样式枚举。
Definition: fs_common.h:1132
Range()
构造函数。
static String FlateCompress(const void *data_buffer, size_t length)
使用DEFLATE算法压缩源数据缓冲区。
字体字符集:系统默认,用于未知或映射目的。
Definition: fs_common.h:1556
Definition: fs_common.h:373
float line_width
线宽。
Definition: fs_common.h:1246
环绕填充模式,系统使用图形绘制的方向来 确定是否填充区域。
Definition: fs_common.h:120
模块"XFA"的名称。
Definition: fs_common.h:158
国家语言环境ID:意大利。
Definition: fs_common.h:252
字体类型:CID 字体。
Definition: fs_common.h:1654
~Color()
析构函数。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:196
static void SetDefaultICCProfilesPath(const wchar_t *icc_profile_folder_path)
设置包含默认ICC配置文件的文件夹路径。
颜色空间:DeviceN。
Definition: fs_common.h:220
virtual void OnDocOpened(const pdf::PDFDoc &document, ErrorCode error_code)
在PDF文档打开时触发。
Definition: fs_common.h:1321
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
virtual void OnDocWillOpen()
在文档即将打开时触发。
Definition: fs_common.h:1309
static bool SetDocEventCallback(DocEventCallback *callback)
设置 DocEventCallback 对象到Foxit PDF SDK。
字体字符集:俄文。
Definition: fs_common.h:1572
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:2107
~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:1339
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:449
Definition: fs_basictypes.h:230
static foxit::ErrorCode FlushLog()
刷新日志文件。
bool operator==(const Font &other) const
相等操作符。
ModuleName
许可证信息中使用的模块名称枚举。
Definition: fs_common.h:154
字体类型:Type3。
Definition: fs_common.h:1652
标准字体:ZapfDingbats。
Definition: fs_common.h:1638
标准字体:Helvetica-Oblique,斜体。
Definition: fs_common.h:1626
Definition: fs_security.h:1043
void RemoveAll()
移除所有范围段。
int GetPointCount()
获取点的数量。
static String GetVersion()
获取当前Foxit PDF SDK库的版本。
表示该点是贝塞尔样条的结束点, 并且该点还将连接到此点之前最近的 Path::e_TypeMoveTo 点,以便闭合当前图形。
Definition: fs_common.h:2192
标准字体:Times-Roman。
Definition: fs_common.h:1628
bool operator !=(const Range &other) const
不相等操作符。
WString GetName()
检索PostScript名称。
标准字体:Symbol。
Definition: fs_common.h:1636
顺时针旋转 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:1528
字体字符集:简体中文。
Definition: fs_common.h:1564
颜色空间:Pattern。
Definition: fs_common.h:224
标准字体:Times-Italic。
Definition: fs_common.h:1634
Path()
构造函数。
Definition: fs_common.h:1519
颜色空间:Lab。(3个分量,A、B、C)
Definition: fs_common.h:214
模块"编辑"的名称。
Definition: fs_common.h:160
颜色空间:无效。
Definition: fs_common.h:202
填充模式:无。
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_taggedpdf.h:27
左对齐。
Definition: fs_common.h:96
颜色空间:CalRGB。(3个分量,A、B、C)
Definition: fs_common.h:212
Definition: fs_common.h:342
void AddSingle(int index)
添加索引作为新的范围段。
模块"比较"的名称。
Definition: fs_common.h:166
float dash_phase
虚线模式的虚线相位。
Definition: fs_common.h:1275
StandardID
标准字体ID枚举。
Definition: fs_common.h:1610
File format类型:XFD。
Definition: fs_common.h:276
范围内的所有索引都将被使用。
Definition: fs_common.h:1373
字节字符串类
Definition: fx_string.h:317
进度状态:进度已完成。
Definition: fs_common.h:386
字体字符集:希伯来文。
Definition: fs_common.h:1578
UInt32Array AddUnicodes(const pdf::PDFDoc &document, const UInt32Array &unicode_array)
向当前嵌入字体添加Unicode字符。
Charset
字体字符集枚举。
Definition: fs_common.h:1552
static void Free(void *ptr)
释放内存块
字体样式:小型大写。
Definition: fs_common.h:1542
字体字符集:希腊文。
Definition: fs_common.h:1574
字体类型:Type1。
Definition: fs_common.h:1648
模块"无障碍"的名称。
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:274
virtual void Release()=0
用于释放当前回调对象自身的回调函数。
float GetCharWidth(uint32 unicode) const
获取由Unicode指定的字符的宽度(以1/1000 em大小为单位(PDF单位))。
标准字体:Helvetica-BoldOblique,粗斜体。
Definition: fs_common.h:1624
static bool AddExternalFontPath(const wchar_t *font_path)
添加外部字体路径。
static void * Alloc(size_t size)
分配内存块
bool IsEmpty() const
检查当前对象是否为空。
字体字符集:波罗的海文。
Definition: fs_common.h:1582
标准字体:Courier。
Definition: fs_common.h:1612
GraphState & operator=(const GraphState &state)
赋值操作符。
Definition: fs_common.h:1205
基于中心点旋转文本块。
Definition: fs_common.h:78
字体字符集:土耳其文。
Definition: fs_common.h:1576
FontMapResult(foxit::common::file::ReaderCallback *file_read, int face_index)
带参数的构造函数。
Definition: fs_common.h:2023
基于矩形的左下角点旋转文本块。
Definition: fs_common.h:84
模块"Office2PDF"的名称。
Definition: fs_common.h:190
bool operator !=(const RenderConfig &render_config) const
不相等操作符。
Definition: fs_common.h:477
进度状态:发生任何错误。
Definition: fs_common.h:382
int graphics_objs_count_in_one_step
在渐进式渲染过程中一步中要渲染的图形对象数量。这应该是一个正值。
Definition: fs_common.h:507
#define NULL
空指针值。
Definition: fx_system.h:792
bool operator==(const RenderConfig &render_config) const
相等操作符。
Definition: fs_common.h:464
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:1330
void Set(int graphics_objs_count_in_one_step)
设置值。
Definition: fs_common.h:491
Definition: fx_coordinates.h:1076
模块"Print2PDF"的名称
Definition: fs_common.h:192
字体字符集:东欧。
Definition: fs_common.h:1570
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:2186
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:2174
ColorSpace GetColorSpace()
获取当前颜色所属的颜色空间。
标准字体:Courier-Oblique,斜体。
Definition: fs_common.h:1618
国家语言环境ID:荷兰。
Definition: fs_common.h:246
标准字体:Courier-Bold。
Definition: fs_common.h:1614
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:280
字体字符集:泰文。
Definition: fs_common.h:1568
CID字体字符集:Adobe-Korea1。
Definition: fs_common.h:1600
void Set(foxit::common::file::ReaderCallback *file_read, int face_index)
设置值。
Definition: fs_common.h:2088
File format类型:PDF。
Definition: fs_common.h:278
基于矩形的右下角点旋转文本块。
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:1264
RenderConfig & operator=(const RenderConfig &render_config)
赋值操作符。
Definition: fs_common.h:452