DecryptFile
PdfFileSecurity.DecryptFile method
通过所有者密码解密加密的 Pdf 文档。 如果文档没有所有者密码,则允许使用用户密码。 如果处理失败抛出异常。
public bool DecryptFile(string ownerPassword)
范围 | 类型 | 描述 |
---|---|---|
ownerPassword | String | 所有者密码。 |
返回值
真正的成功。
例子
[C#]
string inFile = "D:\\input.pdf"; //TestPath 可能会被重新分配。
string outFile = "D:\\output.pdf"; //TestPath 可能会被重新分配。
PdfFileSecurity fileSecurity = new PdfFileSecurity(inFile,outFile);
fileSecurity.DecryptFile("ownerpass");
[Visual Basic]
Dim inFile As String = "D:\\input.pdf" 'The TestPath may be re-assigned.'
Dim outFile As String = "D:\\output.pdf" 'The TestPath may be re-assigned.'
Dim fileSecurity As PdfFileSecurity = New PdfFileSecurity(inFile,outFile)
fileSecurity.DecryptFile("ownerpass")
也可以看看
- class PdfFileSecurity
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF