c#
VB
c++
Java
公共保龄球AnnotationsEnabled {得到;集;}
公共财产AnnotationsEnabled作为布尔
公共布尔getAnnotationsEnabled ();
公共无效setAnnotationsEnabled (
布尔booleanValue
);
真正的允许外部查看者和编辑者在PDF文档中添加注释和评论;否则,为假。默认值为真正的。
的价值AnnotationsEnabled仅在保护具有所有者密码设置的PDF文件时使用OwnerPassword。
使用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)
结束子
公共NotInheritable类LEAD_VARS
公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”
结束类
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗网页查看器net
188宝金博怎么下载
支持的平台上
.NET、Java、Android和iOS/macOS程序集
C API/ c++类库
HTML5 JavaScript库
您的邮件已经发送到支持!应该有人保持联系!如果你有急事,请回来再谈。
聊天时间:
周一至周五,上午8:30至下午6点
感谢您的反馈!
请重新填写表格以开始新的聊天。
所有代理当前都处于离线状态。
聊天时间:
星期一至星期五
上午8:30 -下午6点
要联系我们,请填写此表格,我们将通过电子邮件与您联系。