There are two types of open encrypted PDF.
1: Open the protected PDF file with the original (correct) password.
2: Try to open an encrypted PDF file without knowing the password.
Solution:
1. If you want to open the PDF password without knowing the password, it is recommended to try Google Drvice, which is a free and safe method to delete the password on the PDF.
https://drive.google.com/drive/
2. If you don't know the password, I suggest you try GuaPDF. It can delete any easy password from the PDF to open the encrypted PDF file.
By the way, if the password is too complicated, the most effective way is to use professional tools. In order to ensure the security of the data in the PDF file, this is the best choice. Recommend the software i have used here:
https://www.bestpdfpasswordremover.com/how-to-remove-password-from-pdf.html
Hi Guys,
I have a taxation document - Form 26AS but it is password protected. Shall I upload it as it is delete PDF protection online? Is there a way I can mention the password somewhere while uploading documents ?
Thanks
Hi oddssatisfy,
If you are trying to load the encrypted document without a password, it will throw a PDFException. To load the encrypted document, please follow the below steps:
To find the encrypted document, you need to use a try-catch block while loading.
Way -1
try { ldoc = new PdfLoadedDocument(stream); pdfViewer.LoadDocument(fileStream); } catch (PdfException pdfException) { if (pdfException.Message == "Can't open an encrypted document. The password is invalid.") { var password = "XYZ"; pdfViewer.LoadDocument(fileStream, password); } } |
Way -2
try { ldoc = new PdfLoadedDocument(stream); pdfViewer.LoadDocument(fileStream); } catch (PdfException pdfException) { if (pdfException.Message == "Can't open an encrypted document. The password is invalid.") { ldoc = new PdfLoadedDocument(stream, password); pdfViewer.LoadDocument(ldoc); } } |
Note: Currently, we don’t have support to show the default password popup in our control. You can create your own password popup if needed and using that entered password text, you can load the encrypted document with the above suggestion.
If you still receive any issues kindly provide a PDF and password in this forum thread.
Regards,
Manoj Kumar.