Can I have some advice on how best to deal with errors when calling the .Load command please as the TryCatch is not triggered. In particular, if the document is password protected. How best could I obtain what the reason might be to present the user with this information.
Hi Simon,
TryCatch should work.
Can you please send us a small snippet code you’re currently using and a sample PDF file reproducing your issue so we can investigate it?
Regards,
Mario
To identify encrypted PDF files, you can use this:
Using document = PdfDocument.Load("input.pdf")
Dim isEncryption As Boolean = document.SaveOptions.Encryption IsNot Nothing
' ...
End Using
Regards,
Mario