←选择平台

PDFFile类

总结

PDF文件功能类。

语法

c#
c++ / CLI
Java
[SerializableAttribute ()]公共PDFFile
公共PDFFile
[SerializableAttribute ()]公共ref类PDFFile

讲话

PDFFile在Adobe类允许以下操作文档格式(PDF)和Postscript (PS)文件:

上面描述的所有方法的兼容性级别(版本)可以设置创建或更新PDF使用CompatibilityLevel使用属性,更新其属性DocumentProperties财产或设置安全性和加密模式使用SecurityOptions财产。

使用这些属性的方法,构造一个PDFFile对象的PDF文件和可选的密码之前执行的行动。

c# PDF文件演示附带LEAD188金宝搏beat体育官网TOOLS包含一个向导样式的用户界面来执行上述操作现有的PDF和PS文件。

您还可以使用PDFDocument类来解析一个PDF文件和提取它的对象(如文本(没有调用OCR)、图片、超链接、注释、表单字段、数字签名、内部链接和书签。

例子

这个例子将显示现有的PDF文件的属性,更新它的属性,然后将文件保存到一个新文件。

c#
使用Leadtools.WinForms;使用Leadtools;使用Leadtools.Codecs;使用Leadtools.Controls;使用Leadtools.Drawing;使用Leadtools.ImageProcessing;使用Leadtools.Pdf;使用Leadtools.Svg;公共无效PDFFileExample (){字符串sourceFileName = Path.Combine (LEAD_VARS.ImagesDir,@“Leadtools.pdf”);字符串destFileName = Path.Combine (LEAD_VARS.ImagesDir,@“LEAD_14.pdf”);/ /加载的属性文件ShowProperties (“源文件”,sourceFileName);/ /更新文件的属性PDFFile文件=PDFFile (sourceFileName);文件。DocumentProperties =PDFDocumentProperties ();file.DocumentProperties。作者=“我”;file.DocumentProperties。Title =“我的名字”;file.DocumentProperties。主题=“我的话题”;file.DocumentProperties。创造者=“我的应用”;file.DocumentProperties。修改= DateTime.Now;file.SetDocumentProperties (destFileName);/ /显示新文件的属性ShowProperties (“目标文件”,destFileName);}私人静态无效ShowProperties (字符串消息,字符串文件名){Console.WriteLine(消息);/ /得到文件的属性PDFFile文件=PDFFile(文件名);file.Load ();PDFDocumentProperties道具= file.DocumentProperties;Console.WriteLine (“标题:{0}”,props.Title);Console.WriteLine (“作者:{0}”,props.Author);Console.WriteLine (“主题:{0}”,props.Subject);Console.WriteLine (关键词:{0}”,props.Keywords);Console.WriteLine (“创造者:{0}”,props.Creator);Console.WriteLine (“制片人:{0}”,props.Producer);Console.WriteLine (“创建:{0}”,props.Created);Console.WriteLine (“修改:{0}”,props.Modified);Console.WriteLine (”- - - - - - - - - - -:“);}静态LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS22 \ Resources \图片”;}

需求

目标平台

另请参阅

Leadtools。Pdf组装
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2023领先的技术公司。保留所有权利。