原創|使用教程|編輯:郝浩|2013-03-12 11:52:41.000|閱讀 847 次
概述:PDF每頁的注釋都可以在該頁的注釋集合中找到,如果要找到某一個特定的注釋,就必須先為該注釋制定一個索引。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
PDF每頁的注釋都可以在該頁的注釋集合中找到,如果要找到某一個特定的注釋,就必須先為該注釋制定一個索引。
下面的代碼片段顯示了你如何獲得一個特定的注釋和它的屬性:
C#
//open document Document pdfDocument = new Document("input.pdf"); //get particular annotation TextAnnotation textAnnotation = (TextAnnotation)pdfDocument.Pages[1].Annotations[1]; //get annotation properties Console.WriteLine("Title : {0} ", textAnnotation.Title); Console.WriteLine("Subject : {0} ", textAnnotation.Subject); Console.WriteLine("Contents : {0} ", textAnnotation.Contents);
VB.NET
'open document Dim pdfDocument As New Document("input.pdf") 'get particular annotation Dim textAnnotation As TextAnnotation = CType(pdfDocument.Pages(1).Annotations(1), TextAnnotation) 'get annotation properties Console.WriteLine("Title : {0} ", textAnnotation.Title) Console.WriteLine("Subject : {0} ", textAnnotation.Subject) Console.WriteLine("Contents : {0} ", textAnnotation.Contents)
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網