Foxit PDF SDK
fs_ofdannot.h
1 #ifndef FS_OFD_ANNOT_H_
2 #define FS_OFD_ANNOT_H_
3 
4 #include "common/fs_common.h"
5 
11 namespace foxit {
15 namespace ofd {
16 class Actions;
17 
19 class Annot FS_FINAL : public Base {
20  public:
26  typedef enum _AnnotType {
41  } AnnotType;
42 
43 
45  ~Annot();
46 
52  Annot(const Annot& other);
53 
61  Annot& operator = (const Annot& other);
62 
70  bool operator == (const Annot& other) const;
71 
79  bool operator != (const Annot& other) const;
80 
88  bool IsEmpty() const;
89 
96 
106 
113  AnnotType GetType();
114 
121 
127  String GetSubtype();
128 
134  String GetCreator();
135 
142 
152 
159 
167  void SetBoundary(const foxit::RectF& rect);
168 
176  void SetSubtype(const String& subtype);
177 
185  void SetCreator(const String& creator);
186 
194  void SetLastModDate(const foxit::DateTime& date_time);
195 
203  void SetLinkUri(const String& uri);
204 
210  bool IsPrintable();
211 
219  void EnablePrintable(bool printable);
220 
226  bool IsVisible();
227 
235  void EnableVisible(bool visible);
236 
242  bool IsReadOnly();
243 
251  void EnableReadOnly(bool read_only);
252 
259 
260  explicit Annot(FS_HANDLE handle);
261 };
262 
264 class AnnotCombination FS_FINAL : public Base {
265  public:
270 
273 
279  AnnotCombination(const AnnotCombination& other);
280 
289 
297  bool operator == (const AnnotCombination& other) const;
298 
306  bool operator != (const AnnotCombination& other) const;
307 
315  bool IsEmpty() const;
316 
324  bool AddAnnotFile(const String& file_path);
325 
333  bool AddAnnotFile(const WString& file_path);
334 
343  bool AddAnnotFile(const void* buf, size_t buf_len);
344 
353 
361  bool ExportToFile(const String& file_path);
362 
370  bool ExportToFile(const WString& file_path);
371 
378 
387 
388  explicit AnnotCombination(FS_HANDLE handle);
389 };
390 
391 } // namespace ofd
392 } // namespace foxit
393 
394 #endif // FS_OFD_ANNOT_H_
String ExportToFile()
导出新的标注组合ofd文件到内存缓冲区。
标注类型:未知。
Definition: fs_ofdannot.h:28
~Annot()
析构函数。
文件写入接口。
Definition: fx_stream.h:470
bool IsPrintable()
判断标注是否可打印。
int GetAppearanceObjectCount()
获取标注外观中的图元对象数量。
标注类型:水印。
Definition: fs_ofdannot.h:38
Actions GetActions()
获取标注的动作集合。
标注类型:链接。
Definition: fs_ofdannot.h:30
Definition: fs_ofdgraphicsobject.h:177
ObjectType
OFD图元对象类型定义枚举类型.
Definition: fs_ofdgraphicsobject.h:184
Definition: fs_basictypes.h:498
String GetSubtype()
获取标注子类型。
graphics::OFDGraphicsObject AddAppearanceObject(graphics::OFDGraphicsObject::ObjectType type)
添加标注外观图元对象。
void EnableVisible(bool visible)
设置标注是否可见。
标注类型:高亮。
Definition: fs_ofdannot.h:34
标注类型:控件。
Definition: fs_ofdannot.h:40
文件读取接口。
Definition: fx_stream.h:587
void SetBoundary(const foxit::RectF &rect)
设置标注外接矩形框。
宽字符串类
Definition: fx_string.h:1457
bool IsEmpty() const
检查当前对象是否为空。
void SetCreator(const String &creator)
设置标注创建者。
bool operator !=(const AnnotCombination &other) const
不相等操作符。
AnnotCombination()
构造函数。
void EnableReadOnly(bool read_only)
设置标注是否只读。
bool IsVisible()
判断标注是否可见。
void SetLastModDate(const foxit::DateTime &date_time)
设置标注最后修改日期时间。
AnnotType
OFD标注类型定义枚举类型.
Definition: fs_ofdannot.h:26
foxit::RectF GetBoundary()
获取标注外接矩形框。
~AnnotCombination()
析构函数。
标注类型:印章。
Definition: fs_ofdannot.h:36
bool operator==(const Annot &other) const
相等操作符。
String GetCreator()
获取标注创建者。
bool operator !=(const Annot &other) const
不相等操作符。
graphics::OFDGraphicsObject AddBlockAppearanceObject()
添加标注外观块图元对象。
Annot(const Annot &other)
构造函数,通过另一个OFD标注对象。
bool AddAnnotFile(const String &file_path)
添加标注文件。
Definition: fs_ofdaction.h:679
Definition: fs_ofdannot.h:19
AnnotType GetType()
获取标注类型。
bool IsEmpty() const
检查当前对象是否为空。
void SetLinkUri(const String &uri)
设置链接URI。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:195
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
通用定义和类的头文件。
Annot & operator=(const Annot &other)
赋值操作符。
foxit::uint32 GetID()
获取标注的ID。
Definition: fs_basictypes.h:465
void SetSubtype(const String &subtype)
设置标注子类型。
graphics::OFDGraphicsObject GetAppearanceObject(int index)
获取标注外观中的图元对象。
Foxit命名空间。
Definition: fs_taggedpdf.h:27
bool ExportAnnotFile(foxit::common::file::WriterCallback *file_writer)
导出标注组合到新的ofd文件。
字节字符串类
Definition: fx_string.h:317
AnnotCombination & operator=(const AnnotCombination &other)
赋值操作符。
bool operator==(const AnnotCombination &other) const
相等操作符。
bool IsReadOnly()
判断标注是否只读。
void EnablePrintable(bool printable)
设置标注是否可打印。
Definition: fs_ofdannot.h:264
标注类型:路径。
Definition: fs_ofdannot.h:32
Definition: fx_coordinates.h:771