半岛外围网上直营

logo Aspose.PDF使用教程
文档半岛外围网上直营>>Aspose.PDF使用教程>>Aspose.Pdf使用教程:获取PDF文档中的所有注释

Aspose.Pdf使用教程:获取PDF文档中的所有注释


为了从PDF文档中获取PDF文件页的注释,一般需要依次查看指定PDF页中的Annotations注释集。请注意,如果你想获得整个PDF的所有注释,就不得不在浏览注释集合之前查看文档的Pages页面集合。你可以以名叫MarkupAnnotation的基础注释类型的方式得到每个集合的所有注释,并显示其属性。

》》》下载Aspose.Pdf试用版

下面是代码示例:

C#

//open document
Document pdfDocument = new Document("input.pdf");

//loop through all the annotations
foreach (MarkupAnnotation annotation in pdfDocument.Pages[1].Annotations)
{

//get annotation properties
Console.WriteLine("Title : {0} ", annotation.Title);
Console.WriteLine("Subject : {0} ", annotation.Subject);
Console.WriteLine("Contents : {0} ", annotation.Contents);
Console.WriteLine("ReadOnly : {0} ", annotation.ReadOnly);
}

VB.NET

'open document
Dim pdfDocument As New Document("input.pdf")

'loop through all the annotations
For Each annotation As MarkupAnnotation In pdfDocument.Pages(1).Annotations

'get annotation properties
Console.WriteLine("Title : {0} ", annotation.Title)
Console.WriteLine("Subject : {0} ", annotation.Subject)
Console.WriteLine("Contents : {0} ", annotation.Contents)
Console.WriteLine("ReadOnly : {0} ", annotation.ReadOnly)
Next annotation
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP
利记足球官网(官方)网站/网页版登录入口/手机版登录入口-最新版(已更新) 真人boyu·博鱼滚球网(官方)网站/网页版登录入口/手机版登录入口-最新版(已更新) 最大网上PM娱乐城盘口(官方)网站/网页版登录入口/手机版登录入口-最新版(已更新) 正规雷火竞技官方买球(官方)网站/网页版登录入口/手机版登录入口-最新版(已更新) 雷火竞技权威十大网(官方)网站/网页版登录入口/手机版登录入口-最新版(已更新) boyu·博鱼信誉足球官网(官方)网站/网页版登录入口/手机版登录入口-最新版(已更新) 权威188BET足球网(官方)网站/网页版登录入口/手机版登录入口-最新版(已更新) 正规188BET足球大全(官方)网站/网页版登录入口/手机版登录入口-最新版(已更新)