TryDecryptFile

PdfFileSecurity.TryDecryptFile method

Şifrelenmiş bir Pdf belgesinin şifresini sahip parolasıyla çözer. Belgenin sahip parolası yoksa, kullanıcı parolasını kullanmasına izin verilir. İşlem başarısız olursa bir istisna oluşturmaz.

public bool TryDecryptFile(string ownerPassword)
ParametreTipTanım
ownerPasswordStringSahip şifresi.

Geri dönüş değeri

Başarı için doğru veya yanlış.

Örnekler

[C#]
string inFile = "D:\\input.pdf"; // TestPath yeniden atanabilir.
string outFile = "D:\\output.pdf"; // TestPath yeniden atanabilir.	
PdfFileSecurity fileSecurity = new PdfFileSecurity(inFile,outFile);		
bool result = fileSecurity.TryDecryptFile("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) 
Dim result As Boolean = fileSecurity.TryDecryptFile("ownerpass")

Ayrıca bakınız