PDF 生成模板编辑器
开源可视化 PDF 生成引擎,支持自定义模板,并提供面向开发者的 API,灵活构建文档生成流程。
获取注释列表和注释对象的步骤如下:
以下是对应的代码:
CPDFDocument document = CPDFDocument.InitWithFilePath("filePath");
int pageCount = document.PageCount;
if(pageCount>0)
{
for(int pageIndex = 0;pageIndex < pageCount;pageIndex++)
{
// 取得页面对象,并在页面对象中取得注释列表
List<CPDFAnnotation>annotations = document.PageAtIndex(pageIndex).GetAnnotations();
if(annotations != null && annotations.Count != 0)
{
// 遍历列表中的每一个注释对象
foreach(CPDFAnnotation annotation in annotations)
{
// 对获取到的注释对象进行相关操作。
}
}
}
}