We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Problem with opening encrypted pdf (password pdf).. need help..!


I am trying to open a encrypted pdf(pdf with password) using syncfusion.

this PDF file is encrypted with AES, keysize is 256bit Revision 6. (result of debug)

code are like this
loadDocument =  new PDFLoadedDocument(buffer , pw);

※AES 128bit is no problem

But after pdfviewer.LoadDocument();

it brings a unhandled error message. I tried to take these code in try {} catch phrase, but

it did no help. It seems to look like a xaml error but anyone could help me?

Thanks very much.

6 Replies

JP Jhansi Priya Ramesh Syncfusion Team November 29, 2019 07:55 AM

Hi KimJiyun, 

We tried reproducing the issue “Unhandled exception occurs while loading the AES 256 encrypted PDF document” with the sample PDF document created from Syncfusion PDF library , but it is working fine as expected. Please find the sample application from below with which we tried to reproduce the issue in our end. 

We suspect that the issue may occur specifically with the PDF document you are using at your end. Kindly share the following details to analyze more on this issue and assist with better solution. 
1.       Simple sample or modify the above sample with which issue could be reproduced. 
2.       Sample PDF document in which issue could be reproduced. 
3.       SfPdfViewer version. 
4.       Exception details/Stacktrace details 

Jhansi Priya Ramesh 

KI KimJiyun December 2, 2019 03:45 AM

I am really Thanks for your answer.

I have ran your sample code with my attached file and some of AES 256 bit encrypted pdf,

but it did not worked too.

could you try by my pdf sample and give me some other solutions?

I would be really glad. thanks.

(※password : amada)

Attachment: error256bit_61c2c4b0.zip

JP Jhansi Priya Ramesh Syncfusion Team December 3, 2019 05:16 AM

Hi KimJiyun, 

Thank you providing the sample PDF document. We could able to reproduce the issue “Application crashes while loading an encrypted document” with the provided encrypted document. We have forwarded this issue to our development team for further analysis and we will update further details on 5th November 2019. 

Jhansi Priya Ramesh 

NK Navaneetha Kannan Sudalai Muthu Syncfusion Team December 5, 2019 10:47 AM

Hi KimJiyun,  

The issue “Application crashes while loading an encrypted document” is not a defect in Syncfusion PDF Viewer. We use UWP platform’s PdfDocument API to convert PDF pages to images and display the images in the PDF Viewer. The exception is due to a bug in the PdfDocument API. Since this issue is specific to the PDF you have given, we need to post this bug on MSDN Windows Developer Center along with this PDF.  

Kindly let us know whether we can attach the PDF you have given while logging the bug in MSDN.  

For your reference, we have created a simple sample which reproduces this issue in PdfDocument. We have also attached another simple password protected PDF (Encrypted Document.pdf, password is “syncfusion”) with this sample. For this PDF there is no crash. The crash occurs only for the provided PDF (error256bit.pdf). The sample can be downloaded from the below link.  

Also, the Microsoft Edge application renders PDFs using this PdfDocument API. In Edge also, the error256bit.pdf is not able to be viewed. But the EncrypedDocument.pdf is shown.  

Navaneetha Kannan 

RU RunSam October 21, 2021 02:13 AM

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.


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.


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:


VD Vikram Devaraj Syncfusion Team October 27, 2021 10:34 AM

Hi RunSam,

Thank you for the suggestions.


Live Chat Icon For mobile
Up arrow icon