原創(chuàng)|使用教程|編輯:郝浩|2013-03-12 11:52:41.000|閱讀 847 次
概述:PDF每頁(yè)的注釋都可以在該頁(yè)的注釋集合中找到,如果要找到某一個(gè)特定的注釋,就必須先為該注釋制定一個(gè)索引。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
PDF每頁(yè)的注釋都可以在該頁(yè)的注釋集合中找到,如果要找到某一個(gè)特定的注釋,就必須先為該注釋制定一個(gè)索引。
下面的代碼片段顯示了你如何獲得一個(gè)特定的注釋和它的屬性:
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)
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)