I try to convert pdf-files to tiff, unsing these statements:
PdfConverter converter = new PdfConverter();
on some files, an exception is thrown here, because the pdf-file is encrypted.
The workaround in the catch-part is:
// wenn Encrption-Problem dann Passwort löschen
PdfFileSecurity sec = new PdfFileSecurity();
sec.InputFile = sInFile;
sec.OutputStream = ms;
This all works fine.
My question: to avoid the exception, I would like to check the pdf-file before calling the DoConvert, to find out, if I have to do the decryption, or not.
Is there a way to find out, if the file is encryted and I have to remove the password?