文档星空最火知名网站>>Aspose.PDF使用教程>>Aspose.Pdf使用教程:删除PDF文件中的指定注释
Aspose.Pdf使用教程:删除PDF文件中的指定注释
Aspose.Pdf从PDF文件中删除指定注释,需要调用[*Annotations*] 集合中的Delete方法,这个集合属于注释存在的页面对象,Delete方法需要被删除注释的指数。之后,保存更新之后的PDF文档。
下面是代码示例:
C#
//open document
Document pdfDocument = new Document("input.pdf");
//delete particular annotation
pdfDocument.Pages[1].Annotations.Delete(1);
//save updated document
pdfDocument.Save("output.pdf");
VB.NET
'open document
Dim pdfDocument As New Document("input.pdf")
'delete particular annotation
pdfDocument.Pages(1).Annotations.Delete(1)
'save updated document
pdfDocument.Save("output.pdf")

QQ交谈
在线咨询

渝公网安备
50010702500608号

客服热线