PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Jul 18, 2019 7:39 pm

All times are UTC

Forum rules

Please read this before posting on this forum: Forum Rules

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Apr 03, 2018 4:03 pm 

Joined: Tue Apr 03, 2018 3:22 pm
Posts: 1

We have been experiencing the following error for some of the pdf files.

PdfSharp.Pdf.IO.PdfReaderException: The PDF document is protected with an encryption not supported by PDFsharp.
at PdfSharp.Pdf.Security.PdfStandardSecurityHandler.ValidatePassword(String inputPassword)
at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider)
at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, PdfDocumentOpenMode openmode)

Based on the following FAQ statement;
"PDFsharp 1.50 should be able to open all files marked for PDF 1.5 or higher even if they contain IRef streams (see Roadmap) - please submit files that cannot be opened."
I wanted to attached the pdf files but, one was too big and the other was recognized as invalid.
Anyways, I checked both pdf files with var res = PdfReader.TestPdfFile(stream); and it returns 17 for both (I assume it means v 1.7). Once both files are downloaded, in their security properties "unblock" option are seen (windows). Please see the 9DF7DC8B.PNG attachement for this.

If you need to check the pdf files please let me know how I should be sending them to you.

Waiting for your response.


9DF7DC8B.PNG [ 52.99 KiB | Viewed 1397 times ]
Reply with quote  
PostPosted: Tue Apr 03, 2018 4:28 pm 
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2952
Location: Cologne, Germany

"Unblock" is a Windows feature for all files, not just PDF.

Re Encryption:

Thomas Hoevel
PDFsharp Team

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group