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)
ParameterTypBeskrivning
ownerPasswordStringÄ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