DecryptFile
PdfFileSecurity.DecryptFile method
Dekrypterar ett krypterat PDF-dokument med ägarlösenord. Om dokumentet inte har ägarlösenord, är det tillåtet att använda användarlösenord. Kastar ett undantag om processen misslyckades.
public bool DecryptFile(string ownerPassword)
Parameter | Typ | Beskrivning |
---|---|---|
ownerPassword | String | Ägarlösenord. |
Returvärde
Sant för framgång.
Exempel
[C#]
string inFile = "D:\\input.pdf"; //TestPath kan tilldelas om.
string outFile = "D:\\output.pdf"; //TestPath kan tilldelas om.
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")
Se även
- class PdfFileSecurity
- namnutrymme Aspose.Pdf.Facades
- hopsättning Aspose.PDF