Skip to content

PDF 生成模板编辑器

开源可视化 PDF 生成引擎,支持自定义模板,并提供面向开发者的 API,灵活构建文档生成流程。

查看 GitHub

获取转换进度

ComPDF Conversion SDK 通过每次调用的回调参数获取转换进度。以下示例演示了如何在执行 PDF 转 Word 任务时获取转换进度。

objective-c
WordOptions *options = [[WordOptions alloc] init];
[CPDFConversion startPDFToWord:@"input.pdf"
                      password:@"password"
                    outputPath:@"path/output.docx"
                       options:options
                      progress:^(int currentPage, int totalPage) {
    NSLog(@"progress: %d / %d", currentPage, totalPage);
}
                        cancel:nil];