Foxit PDF Conversion SDK
fs_common.h
浏览该文件的文档.
1 
15 #ifndef FS_COMMON_H_
16 #define FS_COMMON_H_
17 
18 #include "fs_basictypes.h"
19 
25 namespace foxit {
29 namespace common {
35  typedef enum _UserPermissions {
41  e_PermPrint = 0x0004,
48  e_PermModify = 0x0008,
55  e_PermExtract = 0x0010,
61  e_PermAnnotForm = 0x0020,
67  e_PermFillForm = 0x0100,
80  e_PermAssemble = 0x0400,
86  e_PermPrintHigh = 0x0800
88 
89 
96  public:
106  virtual bool CheckUserPermissions(uint32 user_permissions) = 0;
107 };
108 
124 class Library FS_FINAL : public Object {
125  public:
142  static ErrorCode Initialize(const char* sn, const char* key);
143 
155  static ErrorCode Reinitialize();
156 
166  static void Release();
167 
173  static String GetVersion();
174 
183  static void EnableThreadSafety(bool is_enable_thread_safety);
184 
196  static bool SetConvertCheckCallback(ConvertCheckCallback* convert_check_callback);
197 
198  private:
199  Library(const Library&);
200  Library& operator = (const Library&);
201 };
202 
206 class Progressive : public Base {
207  public:
213  typedef enum _State {
215  e_Error = 0,
220  } State;
221 
227  Progressive(const Progressive& other);
229  ~Progressive();
230 
238  Progressive& operator = (const Progressive& other);
239 
248  State Continue();
249 
256  int GetRateOfProgress();
257 
258  // 强烈建议用户不要使用此方法;否则可能会发生未知情况。
259  explicit Progressive(FS_HANDLE handle = NULL);
260 };
261 
269 class Range FS_FINAL : public Base{
270  public:
276  typedef enum _Filter {
278  e_All = 0,
280  e_Even = 1,
282  e_Odd = 2
283  } Filter;
284 
286  Range();
287 
293  explicit Range(int index);
294 
307  explicit Range(int start_index, int end_index, Filter filter = e_All);
308 
314  Range(const Range& other);
315 
317  ~Range();
318 
326  Range& operator = (const Range& other);
327 
335  bool operator == (const Range& other) const;
336 
344  bool operator != (const Range& other) const;
345 
353  bool IsEmpty() const;
354 
360  void AddSingle(int index);
361 
376  void AddSegment(int start_index, int end_index, Filter filter = e_All);
377 
383  int GetSegmentCount() const;
384 
393  int GetSegmentStart(int segment_index) const;
394 
403  int GetSegmentEnd(int segment_index) const;
404 
410  void RemoveAll();
411 
412  // 强烈建议用户不要使用此方法;否则可能会发生未知情况。
413  explicit Range(FS_HANDLE handle);
414 };
415 
416 } // namespace common
417 } // namespace foxit
418 
419 #endif // FS_COMMON_H_
420 
以更高质量打印PDF文档。(权限值的第12位)
Definition: fs_common.h:86
Definition: fs_common.h:269
static void Release()
释放Foxit PDF Conversion SDK库分配的所有资源。
int GetRateOfProgress()
获取当前进度的比率。
virtual bool CheckUserPermissions(uint32 user_permissions)=0
检查用户权限以决定是否继续PDF到Office的转换。
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:145
Definition: fs_common.h:124
将仅使用范围内的奇数(丢弃偶数)。
Definition: fs_common.h:282
Range & operator=(const Range &other)
赋值运算符。
Filter
范围过滤器的枚举。
Definition: fs_common.h:276
int GetSegmentCount() const
获取范围段的数量。
bool operator==(const Range &other) const
相等运算符。
static void EnableThreadSafety(bool is_enable_thread_safety)
启用线程安全。
State
进度状态的枚举。
Definition: fs_common.h:213
static ErrorCode Reinitialize()
重新初始化Foxit PDF Conversion SDK库。
static ErrorCode Initialize(const char *sn, const char *key)
使用有效的许可证信息初始化Foxit PDF Conversion SDK库。
Progressive(const Progressive &other)
构造函数,使用另一个渐进式对象。
进度状态:进度需要继续。
Definition: fs_common.h:217
int GetSegmentEnd(int segment_index) const
获取指定范围段的结束索引。
~Progressive()
析构函数。
UserPermissions
PDF文档中用户访问权限的枚举。
Definition: fs_common.h:35
基本类型定义的头文件。
ErrorCode
错误代码的枚举。
Definition: fs_basictypes.h:174
将仅使用范围内的偶数(丢弃奇数)。
Definition: fs_common.h:280
static bool SetConvertCheckCallback(ConvertCheckCallback *convert_check_callback)
设置回调对象以检查PDF到Office转换的条件。
int GetSegmentStart(int segment_index) const
获取指定范围段的起始索引。
bool IsEmpty() const
检查当前对象是否为空。
Range()
构造函数。
Definition: fs_common.h:206
FX_UINT32 uint32
32 位无符号整数。
Definition: fs_basictypes.h:132
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:142
组装PDF文档。(权限值的第11位)
Definition: fs_common.h:80
Definition: fs_common.h:95
Progressive & operator=(const Progressive &other)
赋值运算符。
State Continue()
继续渐进式过程。
~Range()
析构函数。
Definition: fs_basictypes.h:232
void RemoveAll()
移除所有范围段。
static String GetVersion()
获取当前Foxit PDF Conversion SDK库的版本。
修改PDF内容。(权限值的第4位)
Definition: fs_common.h:48
bool operator !=(const Range &other) const
不相等运算符。
辅助功能支持。(权限值的第10位)
Definition: fs_common.h:73
Foxit 命名空间。
Definition: fs_basictypes.h:124
void AddSingle(int index)
添加一个索引作为新的范围段。
以普通模式打印PDF文档。(权限值的第3位)
Definition: fs_common.h:41
将使用范围内的所有索引。
Definition: fs_common.h:278
字节字符串类
Definition: fx_string.h:317
进度状态:进度已完成。
Definition: fs_common.h:219
提取PDF内容。(权限值的第5位)
Definition: fs_common.h:55
操作文本注释并填写交互式表单字段。(权限值的第6位)
Definition: fs_common.h:61
进度状态:发生任何错误。
Definition: fs_common.h:215
填写PDF表单。(权限值的第9位)
Definition: fs_common.h:67
#define NULL
空指针值。
Definition: fx_system.h:792
void AddSegment(int start_index, int end_index, Filter filter=e_All)
添加新的范围段。(反向排序是合法的。)