20 #ifndef __EMSCRIPTEN_RENDER__ 25 #ifndef __EMSCRIPTEN_RENDER__ 71 typedef enum _TextMergeOption {
428 typedef enum _ParseFlags {
440 typedef enum _CalcMarginMode {
452 typedef enum _FlattenOptions {
466 typedef enum _BoxType {
597 bool is_reparse =
false);
668 #ifndef __EMSCRIPTEN_RENDER__ 974 #ifndef __EMSCRIPTEN_RENDER__ 1143 void SetSize(
float width,
float height);
1219 bool Transform(
const Matrix& matrix,
bool need_transform_clip_path,
bool need_transform_annotations =
false);
1382 bool auto_generate_content =
true);
1405 bool auto_generate_content =
true);
1428 bool auto_generate_content =
true);
1600 #endif // FS_PDFPAGE_H_ Definition: fs_pdfgraphicsobject.h:232
annots::Annot AddAnnot(annots::Annot::Type type, const RectF &rect)
向当前PDF页面添加注释。
Definition: fs_pdfobject.h:448
Definition: fs_pdfpage.h:64
bool AddImageFromFilePath(const char *file_path, const PointF &position, float width, float height, bool auto_generate_content=true)
从文件路径添加图像到当前页面。
void SetUserUnitSize(float user_unit)
设置用户单位。
Definition: fs_annot.h:201
Definition: fs_image.h:36
RotationPointOptions
旋转点选项的枚举。
Definition: fs_common.h:76
POSITION GetLastGraphicsObjectPosition(graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
获取图形对象列表中最后一个图形对象的位置,基于类型过滤器。
ParseFlags
PDF页面解析标志枚举。
Definition: fs_pdfpage.h:428
RectF GetSuggestedRect(const common::Bitmap &render_result, const Matrix &render_matrix, const PointF &point) const
基于渲染结果位图为点(位于 PDF坐标系)获取建议的矩形(位于 PDF坐标系)。
virtual ~GraphicsObjects()
析构函数。
页面尺寸:A5。
Definition: fs_pdfpage.h:511
bool GenerateContent()
生成当前图形对象的内容。
Type
PDF图形对象类型的枚举。
Definition: fs_pdfgraphicsobject.h:364
float GetUserUnitSize() const
获取用户单位。
Definition: fs_annot.h:1583
graphics::GraphicsObjectArray GetGraphicsObjectsAtPoint(const PointF &point, float tolerance, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll)
获取指定点的所有图形对象,使用指定的类型过滤器。
bool RemoveGraphicsObject(graphics::GraphicsObject *graphics_object)
删除图形对象。
common::Bitmap LoadThumbnail()
加载缩略图位图。
objects::PDFDictionary * GetResources() const
获取"Resources"的 PDF 字典。
void MoveAnnotToPrev(const annots::Annot &annot)
交换当前注释与其前一个注释的索引。
页面边界的裁剪框。
Definition: fs_pdfpage.h:476
合并具有相同y坐标的连续文本显示操作符。
Definition: fs_pdfpage.h:77
Definition: fx_coordinates.h:30
bool Flatten(bool for_display, uint32 options=PDFPage::e_FlattenAll)
拼合当前PDF页面:根据指定选项,注释或表单字段可能成为页面内容的一部分。
Type
PDF注释类型的枚举。
Definition: fs_annot.h:954
int GetGraphicsObjectCount() const
获取图形对象列表中图形对象的数量。
void SetThumbnail(const common::Bitmap &thumbnail)
设置页面缩略图。
float GetHeight() const
获取页面高度(单位是1/72英寸)。
页面边界的出血框。
Definition: fs_pdfpage.h:491
POSITION InsertGraphicsObject(POSITION position_insert_after, graphics::GraphicsObject *graphics_object)
在指定位置后插入图形对象。
宽字符串类
Definition: fx_string.h:1457
void UpdateAnnotList()
更新注释列表。
扁平化PDF页面但不包括表单控件。
Definition: fs_pdfpage.h:458
通过检测路径或图像来计算边距。
Definition: fs_pdfpage.h:444
SignatureType
签名类型的枚举。
Definition: fs_signature.h:251
RectF CalculateNewRectForText(const wchar_t *text, const foxit::RectF &rect, const foxit::pdf::RichTextStyle &style, int rotation, common::RotationPointOptions rotate_point=common::e_RotationPointCenter, bool disable_embed_font=false)
计算新文本矩形。
graphics::GraphicsObject * GetGraphicsObjectAtDevicePoint(const PointF &point, float tolerance, const Matrix *matrix, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
获取设备坐标系统中指定点的最顶层图形对象,使用指定的类型过滤器。
objects::PDFObject * GetContents() const
获取"Contents"的 PDF 对象。
BoxType
页面框类型枚举。
Definition: fs_pdfpage.h:466
Definition: fs_pdfdoc.h:771
void SetRotation(common::Rotation rotate)
设置页面旋转。
bool Transform(const Matrix &matrix, bool need_transform_clip_path, bool need_transform_annotations=false)
转换PDF页面,包括页面上的注释和表单字段。
bool HasWatermark()
检查当前页面是否有水印(不包括Foxit PDF SDK试用水印)。
页面尺寸:A4。
Definition: fs_pdfpage.h:509
POSITION GetGraphicsObjectPosition(graphics::GraphicsObject *graphics_object)
获取指定图形对象的位置。
GraphicsObjects & operator=(const GraphicsObjects &other)
赋值操作符。
Matrix GetDisplayMatrix(int left, int top, int width, int height, common::Rotation rotate)
获取PDF页面的显示矩阵,从PDF坐标系统到 目标设备坐标系统。
bool operator!=(const GraphicsObjects &other) const
不等操作符。
表示所有图形对象类型,仅用作过滤器。
Definition: fs_pdfgraphicsobject.h:366
bool IsScanned()
检查当前PDF页面是否为扫描页面。
PDFPage(const PDFDoc &document, objects::PDFDictionary *page_dict)
构造函数,从表示PDF页面的PDF字典和包含该字典的PDF文档创建。
页面边界的媒体框。
Definition: fs_pdfpage.h:471
PDFDoc GetDocument() const
获取当前PDF页面所属的PDF文档。
RectF CalcContentBBox(CalcMarginMode mode)
计算PDF页面的内容区域。
int GetIndex() const
获取页面索引。
bool IsParsed() const
检查当前页面是否已被解析。
页面边界的修剪框。
Definition: fs_pdfpage.h:481
FlattenOptions
扁平化选项枚举。
Definition: fs_pdfpage.h:452
bool RemoveAnnot(const annots::Annot &annot)
移除注释。
annots::Annot GetAnnotAtPoint(const PointF &position, float tolerance)
获取指定位置的注释,在PDF坐标系统中。
RectF GetBox(BoxType box_type)
获取页面框。
页面尺寸:B4。
Definition: fs_pdfpage.h:519
int GetAnnotCount()
获取注释的数量。
bool HasTransparency()
检查当前PDF页面是否具有透明度。
objects::PDFStream * GetThumb() const
获取"Thumb"的 PDF 流。
bool SetAnnotGroup(const annots::MarkupArray &annot_array, int header_index)
将所有输入的标记注释组合在一起。
float GetWidth() const
获取页面宽度(单位是1/72英寸)。
页面尺寸:A2。
Definition: fs_pdfpage.h:505
annots::Annot GetAnnotAtDevicePoint(const PointF &position, float tolerance, const Matrix *matrix=0)
获取指定位置的注释,在设备坐标系统中。
annots::AnnotArray GetAnnotsAtPoint(const PointF &position, float tolerance)
获取指定位置的所有注释,在PDF坐标系统中。
Size
页面尺寸类型枚举。
Definition: fs_pdfpage.h:499
Definition: fx_basic.h:3737
不进行文本合并。
Definition: fs_pdfpage.h:73
foxit::pdf::Signature AddSignature(const foxit::RectF &rect)
向PDF页面添加普通签名。
页面尺寸:A6。
Definition: fs_pdfpage.h:513
FX_POSITION POSITION
用于表示集合中元素位置的值。
Definition: fs_basictypes.h:206
页面尺寸:B5。
Definition: fs_pdfpage.h:521
页面尺寸:B3。
Definition: fs_pdfpage.h:517
Definition: fs_common.h:373
页面边界的艺术框。
Definition: fs_pdfpage.h:486
Definition: fx_basic.h:1278
annots::AnnotArray GetAnnotsAtDevicePoint(const PointF &position, float tolerance, const Matrix *matrix=0)
获取指定位置的所有注释,在设备坐标系统中。
bool RemoveAllWatermarks()
移除所有水印。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:196
bool FlattenAnnot(annots::Annot annot)
拼合注释:将注释合并到页面内容中,然后将其移除。
POSITION GetFirstGraphicsObjectPosition(graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
获取图形对象列表中第一个图形对象的位置,基于类型过滤器。
Definition: fs_pdfpage.h:421
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
graphics::TextObjectArray SplitTextsInRectangle(RectF rect, int split_step)
分割文本对象,这些对象的矩形(在PDF坐标系统中)与指定的矩形 (在PDF坐标系统中)相交,并根据split_step进一步分割相交部分。
common::Rotation GetRotation() const
获取页面旋转。
普通模式解析标志,表示解析PDF页面中的所有内容。
Definition: fs_pdfpage.h:430
Definition: fs_annot.h:1792
objects::PDFArray * GetAnnots() const
获取"Annots"的 PDF 数组。
CFX_Matrix Matrix
矩阵信息,浮点型。
Definition: fs_basictypes.h:467
void MoveAnnotToLast(const annots::Annot &annot)
将指定注释更改为所有注释中的最后一个。
graphics::GraphicsObjectArray GetGraphicsObjectsAtRectangle(const RectF &rect, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll)
获取矩形与指定矩形相交的所有图形对象,使用指定的类型过滤器。
Definition: fs_basictypes.h:449
graphics::GraphicsObjectArray GetGraphicsObjectsAtDevicePoint(const PointF &point, float tolerance, const Matrix *matrix, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll)
获取设备坐标系统中指定点的所有图形对象,使用指定的类型过滤器。
bool RemoveGraphicsObjectByPosition(POSITION position)
通过位置删除图形对象。
common::Progressive StartParse(uint32 flags=PDFPage::e_ParsePageNormal, common::PauseCallback *pause=0, bool is_reparse=false)
开始解析当前页面。
bool Normalize()
通过撤销任何旋转并移除到页面"CropBox"的偏移来转换当前PDF页面。
graphics::GraphicsObject * GetGraphicsObjectAtPoint(const PointF &point, float tolerance, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
获取指定点的最顶层图形对象,使用指定的类型过滤器。
TextMergeOption
文本合并枚举。
Definition: fs_pdfpage.h:71
扁平化PDF页面的所有内容。
Definition: fs_pdfpage.h:454
Definition: fs_annot.h:947
annots::Annot GetAnnot(int index)
通过索引获取注释。
扁平化PDF页面但不包括注释。
Definition: fs_pdfpage.h:456
Definition: fs_pdfobject.h:848
CalcMarginMode
计算边距模式枚举。
Definition: fs_pdfpage.h:440
void ClearRenderCache()
清除渲染缓存。
bool operator==(const GraphicsObjects &other) const
相等操作符。
Rotation
旋转的枚举。
Definition: fs_common.h:57
void MoveAnnotToNext(const annots::Annot &annot)
交换当前注释与其下一个注释的索引。
Foxit命名空间。
Definition: fs_taggedpdf.h:27
Definition: fs_pdfobject.h:55
int GetGraphicsObjectIndex(graphics::GraphicsObject *graphics_object) const
获取指定图形对象在图形对象列表中的索引。
void SetSize(float width, float height)
设置页面宽度和高度。
void MoveAnnotToFirst(const annots::Annot &annot)
将指定注释更改为所有注释中的第一个。
POSITION GetPrevGraphicsObjectPosition(POSITION position, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
获取图形对象列表中上一个图形对象的位置, 基于类型过滤器和指定的当前位置。
页面尺寸:B2。
Definition: fs_pdfpage.h:515
objects::PDFObject * GetInheritedAttribute(const char *attruibute_name) const
获取指定属性的 PDF 对象,该属性可能从页面树中的祖先节点继承。
graphics::GraphicsObject * GetGraphicsObjectAtRectangle(const RectF &rect, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
获取矩形与指定矩形相交的最顶层图形对象,使用指定的类型过滤器。
foxit::pdf::Signature AddSignatureWithExistedVDict(const foxit::RectF &rect, const foxit::WString &field_name, foxit::pdf::Signature::SignatureType signature_type, bool to_check_permission, const foxit::pdf::Signature &existed_signature)
使用特定签名中已存在的"V"字典添加签名到 PDF 页面。
基于中心点旋转文本块。
Definition: fs_common.h:78
页面尺寸:A3。
Definition: fs_pdfpage.h:507
#define NULL
空指针值。
Definition: fx_system.h:792
Definition: fs_signature.h:99
Definition: fx_coordinates.h:1076
纯文本模式解析标志。
Definition: fs_pdfpage.h:432
将连续的BTET合并为新的一个。
Definition: fs_pdfpage.h:84
页面尺寸:letter(信纸)。
Definition: fs_pdfpage.h:501
页面尺寸:B6。
Definition: fs_pdfpage.h:523
graphics::GraphicsObject * GetGraphicsObject(POSITION position) const
通过图形对象列表中的位置获取图形对象。
POSITION MoveGraphicsObjectByPosition(POSITION current_position, POSITION position_move_after)
将图形对象从一个位置移动到另一个位置。
Definition: fs_pdfobject.h:639
void SetClipRect(const RectF &clip_rect)
为当前PDF页面上的所有图形对象设置剪切矩形。
void SetBox(BoxType box_type, const RectF &box)
设置页面框。
Definition: fs_image.h:449
POSITION GetNextGraphicsObjectPosition(POSITION position, graphics::GraphicsObject::Type filter=graphics::GraphicsObject::e_TypeAll) const
获取图形对象列表中下一个图形对象的位置, 基于类型过滤器和指定的当前位置。
objects::PDFDictionary * GetDict() const
获取页面字典。
bool AddText(const wchar_t *text, const foxit::RectF &rect, const foxit::pdf::RichTextStyle &style, const Matrix &matrix=Matrix(), bool is_each_text=false, bool disable_embed_font=false)
添加文本到当前页面。
页面尺寸:legal(法律用纸)。
Definition: fs_pdfpage.h:503
bool AddImage(const common::Image &image, int frame_index, const PointF &position, float width, float height, bool auto_generate_content=true)
添加图像到当前页面。
Definition: fx_coordinates.h:771
根据所有内容的边界框计算边距。
Definition: fs_pdfpage.h:442
bool IsEmpty() const
检查当前对象是否为空。