原創|使用教程|編輯:郝浩|2013-03-20 14:44:48.000|閱讀 615 次
概述:Aspose.Pdf可以為PDF文件添加各種形式的注釋,包括將swf文件作為注釋添加進PDF文件中,這一操作可以通過簡單的代碼片段實現。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
Aspose.Pdf可以為PDF文件添加各種形式的注釋,包括將swf文件作為注釋添加進PDF文件中,這一操作可以通過簡單的代碼片段實現。
下面是代碼示例:
C#
//Open the PDF document Document doc = new Document("d:/pdftest/input.pdf"); // get reference of the page to which you need to add the annotation Page page = doc.Pages[1]; // create ScreenAnnotation object with .swf multimedia file as an argument ScreenAnnotation annotation = new ScreenAnnotation(page, new Aspose.Pdf.Rectangle(0, 400, 600, 700), @"E:\First_Application_with_Aspose.Pdf_for_.NET.swf"); // add the annotation to annotations collection of page page.Annotations.Add(annotation); // save the update PDF document with annotation doc.Save("d:/pdftest/Pdf_Filesample_with_SWF.pdf");
VB.NET
'Open the PDF document Dim doc As Document = New Document("d:/pdftest/input.pdf") ' get reference of the page to which you need to add the annotation Dim page As Page = doc.Pages(1) ' create ScreenAnnotation object with .swf multimedia file as an argument Dim annotation As ScreenAnnotation = New ScreenAnnotation(page, New Aspose.Pdf.Rectangle(0, 400, 600, 700), "E:\First_Application_with_Aspose.Pdf_for_.NET.swf") ' add the annotation to annotations collection of page page.Annotations.Add(annotation) ' save the update PDF document with annotation doc.Save("d:/pdftest/Pdf_Filesample_with_SWF.pdf")
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網