Aspose.Pdf使用教程:为PDF文件添加swf注释

た 入场券 2023-10-12 15:56 112阅读 0赞

Aspose.PDF 是一款高级PDF处理API,可以在跨平台应用程序中轻松生成,修改,转换,呈现,保护和打印文档。无需使用Adobe Acrobat。此外,API提供压缩选项,表创建和处理,图形和图像功能,广泛的超链接功能,图章和水印任务,扩展的安全控件和自定义字体处理。

Aspose API支持流行文件格式处理,并允许将各类文档导出或转换为固定布局文件格式和最常用的图像/多媒体格式。

Aspose.pdf 最新下载(qun:761297826)icon-default.png?t=N4P3https://www.evget.com/product/4118/download

Aspose.Pdf可以为PDF文件添加各种形式的注释,包括将swf文件作为注释添加进PDF文件中,这一操作可以通过简单的代码片段实现。

下面是代码示例:

C#

  1. //Open the PDF document
  2. Document doc = new Document("d:/pdftest/input.pdf");
  3. // get reference of the page to which you need to add the annotation
  4. Page page = doc.Pages[1];
  5. // create ScreenAnnotation object with .swf multimedia file as an argument
  6. ScreenAnnotation annotation =
  7. new ScreenAnnotation(page, new Aspose.Pdf.Rectangle(0, 400, 600, 700),
  8. @"E:\First_Application_with_Aspose.Pdf_for_.NET.swf");
  9. // add the annotation to annotations collection of page
  10. page.Annotations.Add(annotation);
  11. // save the update PDF document with annotation
  12. doc.Save("d:/pdftest/Pdf_Filesample_with_SWF.pdf");

VB.NET

  1. 'Open the PDF document
  2. Dim doc As Document = New Document("d:/pdftest/input.pdf")
  3. ' get reference of the page to which you need to add the annotation
  4. Dim page As Page = doc.Pages(1)
  5. ' create ScreenAnnotation object with .swf multimedia file as an argument
  6. Dim annotation As ScreenAnnotation =
  7. New ScreenAnnotation(page, New Aspose.Pdf.Rectangle(0, 400, 600, 700),
  8. "E:\First_Application_with_Aspose.Pdf_for_.NET.swf")
  9. ' add the annotation to annotations collection of page
  10. page.Annotations.Add(annotation)
  11. ' save the update PDF document with annotation
  12. doc.Save("d:/pdftest/Pdf_Filesample_with_SWF.pdf")

发表评论

表情:
评论列表 (有 0 条评论,112人围观)

还没有评论,来说两句吧...

相关阅读