SecurityOptions
PdfSaveOptions.SecurityOptions property
在 xls2pdf 结果需要安全性时设置此选项。
public PdfSecurityOptions SecurityOptions { get; set; }
例子
以下代码设置输出pdf的高分辨率打印权限。
Workbook wb = new Workbook();
wb.Worksheets[0].Cells["A1"].Value = "Aspose";
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
PdfSecurityOptions pdfSecurityOptions = new PdfSecurityOptions();
//设置所有者密码
pdfSecurityOptions.OwnerPassword = "YourOwnerPassword";
//设置用户密码
pdfSecurityOptions.UserPassword = "YourUserPassword";
//设置打印权限
pdfSecurityOptions.PrintPermission = true;
//设置打印的高分辨率
pdfSecurityOptions.FullQualityPrintPermission = true;
pdfSaveOptions.SecurityOptions = pdfSecurityOptions;
wb.Save("output.pdf", pdfSaveOptions);
也可以看看
- class PdfSecurityOptions
- class PdfSaveOptions
- 命名空间 Aspose.Cells
- 部件 Aspose.Cells