PDF 生成模板编辑器
开源可视化 PDF 生成引擎,支持自定义模板,并提供面向开发者的 API,灵活构建文档生成流程。
插入空白页面,或插入其他 PDF 页面到目标页面中。
以下是插入空白页面的示例代码:
// 插入到第一页。
const pageIndex = 1;
const width = 612;
const height = 792;
docViewer.insertBlankPage(pageIndex, width, height);以下是插入其他 PDF 页面的示例代码:
const file = {...}; // File文件对象。
const pageIndexToInsert = 1;
const pagesToInsert = [1, '3-5']; // 插入PDF页面的范围。
docViewer.insertPages(file, pageIndexToInsert, pagesToInsert);