跳到主要内容

ApiDocument

表示文档的类。

方法​

下表列出了可用的方法。

方法返回值描述
AddPageApiPage向文档添加新页面。
ApplyRedactboolean应用已添加的涂黑。
GetAllFieldsApiField[]获取文档中所有字段的列表。
GetCalculateOrderstring[]获取文档字段计算顺序
GetClassType"document"返回 ApiDocument 类的类型。
GetFieldByNameApiField | null | undefined按名称获取字段。
GetPageApiPage按索引从文档获取页面。
GetPagesCountnumber获取文档页数
GetSelectedTextstring获取文档中的所选文本
GetSelectionDocSelection | null | undefined获取文档选区信息
GetSelectionQuadsDocQuads按页面获取文档选区四边形
GetStyleApiStyle | null按名称返回文档样式。
Mergeboolean将 PDF 文件合并到当前文档的指定位置。
RemovePageboolean按索引从文档中删除页面。
SearchAndRedactApiRedactAnnotation[]搜索词语并对其添加涂黑。
SetCalculateOrderboolean设置文档字段计算顺序
SetSelectionboolean设置文档选区
SplitPdfFile按指定页面拆分当前 PDF 文件。