PDF 生成模板编辑器
开源可视化 PDF 生成引擎,支持自定义模板,并提供面向开发者的 API,灵活构建文档生成流程。
以下是提取页面的示例代码:
var indexSet = IndexSet()
indexSet.insert(0)
let extractDocument = CPDFDocument()
extractDocument?.importPages(index, from: document, at: 0) // 将原文档的第一页提取到新建文档NSMutableIndexSet *indexSet = [NSMutableIndexSet indexSet];
[indexSet addIndex:0];
CPDFDocument *extractDocument = [[CPDFDocument alloc] init];
[extractDocument importPages:indexSet fromDocument:document atIndex:0];// 将原文档的第一页提取到新建文档