c#
VB
c++
Java
公共PDFEncryptionModeEncryptionMode {得到;集;}
公共财产EncryptionMode作为PDFEncryptionMode
公共PDFEncryptionModegetEncryptionMode ();
公共无效setEncryptionMode (
PDFEncryptionModepDFEncryptionMode
);
公共:
财产PDFEncryptionModeEncryptionMode {
PDFEncryptionModeget ();
无效集(PDFEncryptionMode);
}
一个PDFEncryptionMode成员,指定更新或创建PDF文档时使用的加密模式。默认值为PDFEncryptionMode。RC40Bit.
PDF加密模式随UserPassword用于加密和OwnerPassword设置所有者访问权限属性,在PDF文档中提供自定义安全级别。
使用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 =假;
pdfFile.SecurityOptions.EncryptionMode = PDFEncryptionMode.RC128Bit;
//加密文件,保存到目标文件
pdfFile。转换(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 =假
pdfFile.SecurityOptions.EncryptionMode = PDFEncryptionModeRC128Bit
'通过保存到目标文件对文件进行加密
pdfFile。转换(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:00
感谢您的反馈!
请再次填写表格,开始新的聊天。
所有代理目前都离线。
聊天时间:
星期一至星期五
美国东部时间上午8:30 -下午6点
如需与我们联系,请填写此表格,我们将通过电子邮件与您联系。