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 
18 class Annot FS_FINAL : public Base {
19  public:
25  typedef enum _AnnotType {
40  } AnnotType;
41 
42 
44  ~Annot();
45 
51  Annot(const Annot& other);
52 
60  Annot& operator = (const Annot& other);
61 
69  bool operator == (const Annot& other) const;
70 
78  bool operator != (const Annot& other) const;
79 
87  bool IsEmpty() const;
88 
95 
105 
112  AnnotType GetType();
113 
120 
126  String GetSubtype();
127 
133  String GetCreator();
134 
141 
151 
158 
166  void SetBoundary(const foxit::RectF& rect);
167 
175  void SetSubtype(const String& subtype);
176 
184  void SetCreator(const String& creator);
185 
193  void SetLastModDate(const foxit::DateTime& date_time);
194 
200  bool IsPrintable();
201 
209  void EnablePrintable(bool printable);
210 
216  bool IsVisible();
217 
225  void EnableVisible(bool visible);
226 
232  bool IsReadOnly();
233 
241  void EnableReadOnly(bool read_only);
242 
243  explicit Annot(FS_HANDLE handle);
244 };
245 
247 class AnnotCombination FS_FINAL : public Base {
248  public:
253 
256 
262  AnnotCombination(const AnnotCombination& other);
263 
272 
280  bool operator == (const AnnotCombination& other) const;
281 
289  bool operator != (const AnnotCombination& other) const;
290 
298  bool IsEmpty() const;
299 
307  bool AddAnnotFile(const String& file_path);
308 
316  bool AddAnnotFile(const WString& file_path);
317 
326  bool AddAnnotFile(const void* buf, size_t buf_len);
327 
336 
344  bool ExportToFile(const String& file_path);
345 
353  bool ExportToFile(const WString& file_path);
354 
361 
370 
371  explicit AnnotCombination(FS_HANDLE handle);
372 };
373 
374 } // namespace ofd
375 } // namespace foxit
376 
377 #endif // FS_OFD_ANNOT_H_
String ExportToFile()
导出新的标注组合ofd文件到内存缓冲区。
标注类型:未知。
Definition: fs_ofdannot.h:27
~Annot()
析构函数。
文件写入接口。
Definition: fx_stream.h:470
bool IsPrintable()
判断标注是否可打印。
int GetAppearanceObjectCount()
获取标注外观中的图元对象数量。
标注类型:水印。
Definition: fs_ofdannot.h:37
标注类型:链接。
Definition: fs_ofdannot.h:29
Definition: fs_ofdgraphicsobject.h:177
ObjectType
OFD图元对象类型定义枚举类型.
Definition: fs_ofdgraphicsobject.h:184
Definition: fs_basictypes.h:504
String GetSubtype()
获取标注子类型。
graphics::OFDGraphicsObject AddAppearanceObject(graphics::OFDGraphicsObject::ObjectType type)
添加标注外观图元对象。
void EnableVisible(bool visible)
设置标注是否可见。
标注类型:高亮。
Definition: fs_ofdannot.h:33
标注类型:控件。
Definition: fs_ofdannot.h:39
文件读取接口。
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:25
foxit::RectF GetBoundary()
获取标注外接矩形框。
~AnnotCombination()
析构函数。
标注类型:印章。
Definition: fs_ofdannot.h:35
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_ofdannot.h:18
AnnotType GetType()
获取标注类型。
bool IsEmpty() const
检查当前对象是否为空。
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:471
void SetSubtype(const String &subtype)
设置标注子类型。
graphics::OFDGraphicsObject GetAppearanceObject(int index)
获取标注外观中的图元对象。
Foxit 命名空间。
Definition: fs_accessibility.h:28
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:247
标注类型:路径。
Definition: fs_ofdannot.h:31
Definition: fx_coordinates.h:771