←选择平台

AnnotationsEnabled财产

总结
指示是否可以向PDF文档添加注释和批注。
语法
c#
VB
c++
Java
公共保龄球AnnotationsEnabled {得到;;}
公共财产AnnotationsEnabled作为布尔
公共布尔getAnnotationsEnabled ();公共无效setAnnotationsEnabled (布尔booleanValue);
公共财产保龄球AnnotationsEnabled {保龄球get ();无效集(保龄球);}

属性值

真正的允许外部查看者和编辑者在PDF文档中添加注释和评论;否则,为。默认值为真正的

讲话

的价值AnnotationsEnabled仅在保护具有所有者密码设置的PDF文件时使用OwnerPassword

例子
c#
VB
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.Controls;使用Leadtools.Drawing;使用Leadtools.ImageProcessing;使用Leadtools.Pdf;使用Leadtools.Svg;使用Leadtools.WinForms;///这个示例将使用用户密码和所有者密码加密PDF文件,并限制打印。公共无效PDFFileSecurityOptionsExample ()字符串sourceFileName = Path.Combine(LEAD_VARS.ImagesDir,@“Leadtools.pdf”);字符串destinationFileName = Path.Combine(LEAD_VARS.ImagesDir,@“LEAD_EncryptedNoPrint.pdf”);PDFFile =PDFFile (sourceFileName);//设置安全选项pdfFile。SecurityOptions =PDFSecurityOptions ();pdfFile.SecurityOptions.UserPassword =“领导”;pdfFile.SecurityOptions.OwnerPassword =“LEAD_SECRET”;pdfFile.SecurityOptions.PrintEnabled =;pdfFile.SecurityOptions.HighQualityPrintEnabled =;pdfffile . securityoptions . encryptionmode = PDFEncryptionMode.RC128Bit;//将文件加密保存到目标文件pdfFile。Convert(1, -1, destinationFileName);}静态LEAD_VARS公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;}
进口Leadtools进口Leadtools。编解码器进口Leadtools.Pdf进口Leadtools。WinForms进口Leadtools.Svg进口Leadtools。ImageProcessing这个示例将使用用户密码和所有者密码加密PDF文件,并限制打印。公共PDFFileSecurityOptionsExample ()昏暗的sourceFileName作为字符串= Path.Combine (LEAD_VARS.ImagesDir“Leadtools.pdf”昏暗的destinationFileName作为字符串= Path.Combine (LEAD_VARS.ImagesDir“LEAD_EncryptedNoPrint.pdf”昏暗的pdfFile作为PDFFile =PDFFile (sourceFileName)设置安全选项pdfFile。SecurityOptions =PDFSecurityOptions ()pdfFile.SecurityOptions.UserPassword =“领导”pdfFile.SecurityOptions.OwnerPassword =“LEAD_SECRET”pdfFile.SecurityOptions.PrintEnabled =pdfFile.SecurityOptions.HighQualityPrintEnabled =pdfffile . securityoptions . encryptionmode = PDFEncryptionMode。RC128Bit通过将其保存到目标文件来加密文件pdfFile。Convert(1, -1, destinationFileName)结束公共NotInheritableLEAD_VARS公共常量ImagesDir作为字符串“C: \ LEADTOOLS21 \ Resources \图片”结束
需求

目标平台

Leadtools.Pdf组装
188金宝搏的网址客服|支持|联系我们|知识产权公告
©1991 - 2021领先科技有限公司版权所有。