跳到主要内容

AddPage

向文档添加新页面。

语法

expression.AddPage(index, width, height);

expression - 表示 ApiDocument 类的变量。

参数

名称必需/可选数据类型默认值描述
index必需number要添加页面的索引。
width可选pt页面宽度。
height可选pt页面高度。

返回值

ApiPage

示例

在 PDF 中向文档插入新页面。

// Can I add pages to a PDF document?

// Place additional pages at specific positions in a PDF.

let doc = Api.GetDocument();
doc.AddPage(1);