Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

"last block incomplete in decryption" exception opening PDF Options
Walden
Posted: Tuesday, May 7, 2019 2:00:58 PM
Rank: Member
Groups: Member

Joined: 3/18/2014
Posts: 10
Using the latest EO on nuget (19.1.25) I get a "last block incomplete in decryption" exception trying to open a (specific) PDF. It happens w/EO 19.0.69 as well, can't speak to other versions.

Sample code and exception are below.

The PDF is not password protected, but it is signed. I can share the PDF, but not over open forums.

Code: C#
using System;

static class Program
{
	static void Main()
	{
		var p = new EO.Pdf.PdfDocument(@"E:\tmp\BadPDF.pdf");
	}
}


Code: C#
EO.Internal.fp
  HResult=0x80131500
  Message=last block incomplete in decryption
  Source=EO.Base
  StackTrace:
   at EO.Internal.ap7.a(Byte[] A_0, Int32 A_1)
   at EO.Pdf.PdfDocumentSecurity.a.a(Byte[] A_0, Byte[] A_1, Byte[] A_2, Boolean A_3, Boolean A_4)
   at EO.Pdf.PdfDocumentSecurity.a.a(Stream A_0, Byte[] A_1, Stream A_2, Boolean A_3)
   at EO.Pdf.PdfDocumentSecurity.a.a(Int64 A_0, Int64 A_1, Stream A_2, Stream A_3, Boolean A_4)
   at EO.Pdf.PdfDocumentSecurity.a(Int64 A_0, Int64 A_1, Stream A_2, Stream A_3, Boolean A_4)
   at EO.Internal.vx.a(PdfDocumentSecurity A_0, Int32 A_1, Int32 A_2)
   at EO.Internal.akt.a.a(a5c A_0)
   at EO.Internal.al.c(a5c A_0)
   at EO.Internal.al.a(a5c A_0)
   at EO.Internal.al.a(IEnumerable`1 A_0)
   at EO.Internal.akt.a(PdfDocumentSecurity A_0)
   at EO.Internal.akt.a(Boolean A_0, Boolean A_1, PdfDocumentSecurity A_2)
   at EO.Internal.gh.a(Stream A_0, Boolean A_1, Boolean A_2)
   at EO.Internal.gh.a(String A_0)
   at EO.Internal.gh..ctor(String A_0, PdfDocumentSecurity A_1)
   at EO.Pdf.PdfDocument..ctor(String fileName)
   at Program.Main() in f:\dev\TestPDF\TestPDF\Program.cs:line 7
eo_support
Posted: Wednesday, May 8, 2019 3:28:23 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,292
Hi,

This usually indicates a corrupted PDF file. In such case we can look into it and see if we can ignore the block in question and still load the rest. You can send the PDF file to us and we will be happy to take a look. Please see here for our email address:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!
Walden
Posted: Wednesday, May 8, 2019 4:19:53 PM
Rank: Member
Groups: Member

Joined: 3/18/2014
Posts: 10
EMail Sent.
eo_support
Posted: Friday, May 10, 2019 3:13:07 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,292
Hi,

This is just to let you know that we have found the root of the problem. This will be resolved in our next build.

Thanks!
Walden
Posted: Friday, May 10, 2019 3:25:01 PM
Rank: Member
Groups: Member

Joined: 3/18/2014
Posts: 10
Terrific, thanks. Does the code change work around a bad PDF, or was there a bug. Just curious. And any ETA on the build? Rough numbers is fine, next week? Next month? Next quarter? :-)
eo_support
Posted: Friday, May 10, 2019 3:30:59 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,292
It was a bug on our end. We should have an update next week.
Walden
Posted: Friday, May 10, 2019 3:48:15 PM
Rank: Member
Groups: Member

Joined: 3/18/2014
Posts: 10
Awesome work as always. Thanks. Have a great weekend.
eo_support
Posted: Tuesday, May 14, 2019 7:44:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,292
Hi,

This is just to let you know that we have posted a new build that should resolve the issue. You can download the new build from our download page. Please take a look and let us know how it goes.

Thanks!
Walden
Posted: Tuesday, May 14, 2019 7:56:00 PM
Rank: Member
Groups: Member

Joined: 3/18/2014
Posts: 10
Passes my sample test at least, so I'd say it's good. Build 19.1.40 is what I got from nuGet.

Thanks for the help, call it resolved! :-)

-W
eo_support
Posted: Wednesday, May 15, 2019 12:41:03 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,292
Great. Thanks for confirming the fix!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.