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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:





149504 Nov 28,2019 06:48 AM UTC Dec 5,2019 03:47 PM UTC UWP 4
Tags: SfPdfViewer
Asked On November 28, 2019 07:04 AM UTC


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.

Jhansi Priya Ramesh [Syncfusion]
Replied On November 29, 2019 12:55 PM UTC

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 

Replied On December 2, 2019 08:45 AM UTC

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

Jhansi Priya Ramesh [Syncfusion]
Replied On December 3, 2019 10:16 AM UTC

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 

Navaneetha Kannan Sudalai Muthu [Syncfusion]
Replied On December 5, 2019 03:47 PM UTC

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 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon