原創(chuàng)|使用教程|編輯:郝浩|2013-03-20 14:44:48.000|閱讀 615 次
概述:Aspose.Pdf可以為PDF文件添加各種形式的注釋,包括將swf文件作為注釋添加進(jìn)PDF文件中,這一操作可以通過(guò)簡(jiǎn)單的代碼片段實(shí)現(xiàn)。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
Aspose.Pdf可以為PDF文件添加各種形式的注釋,包括將swf文件作為注釋添加進(jìn)PDF文件中,這一操作可以通過(guò)簡(jiǎn)單的代碼片段實(shí)現(xiàn)。
下面是代碼示例:
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")
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)