Welcome Guest Search | Active Topics | Sign In | Register

System.Exception thrown calling constructor PdfDocument(stream) Options
Andrew
Posted: Friday, January 4, 2013 2:51:20 PM
Rank: Newbie
Groups: Member

Joined: 1/4/2013
Posts: 3
I am encountering an exception when trying to instantiate a PdfDocument when providing a memory stream to the stream constructor. Unfortunately, I am unable to ascertain the source of the problem from the exception details.


System.Exception was caught
Message=Exception of type 'System.Exception' was thrown.
Source=EO.Pdf
StackTrace:
at EO.Pdf.Internal.g4.g()
at EO.Pdf.Internal.g4.a(Boolean A_0)
at EO.Pdf.Internal.hi.a(Stream A_0, Boolean A_1)
at EO.Pdf.Internal.hi..ctor(Stream A_0, PdfDocumentSecurity A_1, Boolean A_2)
at EO.Pdf.Internal.hi..ctor(Stream A_0, PdfDocumentSecurity A_1)
at EO.Pdf.PdfDocument..ctor(Stream stream)
at Schwarz.MSDSLibrary.Domain.Export.ProductPdf.Export(String host, IMSDSRepository msdsRepository, Product[] products) in C:\!Projects\Schwarz.MSDSLibrary\Schwarz.MSDSLibrary.Domain\Export\ProductPdf.cs:line 35
InnerException:


I am using EO.pdf version 4.0.47.2 Any assistance would be greatly appreciated.
eo_support
Posted: Friday, January 4, 2013 3:01:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Most likely this is because the stream you passed to PdfDocument does not contain a valid PDF file. You can try to save the content of your stream to a file, then send that file to us and we will be happy to take a look for you. Let us know if you need our email address.

Thanks!
Andrew
Posted: Friday, January 4, 2013 3:30:28 PM
Rank: Newbie
Groups: Member

Joined: 1/4/2013
Posts: 3
Hello again,

I am encountering this problem with three memory streams, and have saved the stream to a file. Adobe reader is able to open the files without any problems. Could you please provide an email address for me to send the PDF files?

Thanks!
eo_support
Posted: Friday, January 4, 2013 4:09:17 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We have received and looked into the files. The problem is some fields in your file is wrong. We are changing our code to be more tolerant so that it will be able to handle such situations. We should be able to provide you an update build shortly.

Thanks!
Andrew
Posted: Friday, January 4, 2013 4:59:41 PM
Rank: Newbie
Groups: Member

Joined: 1/4/2013
Posts: 3
Thank you, that is wonderful news!!!
eo_support
Posted: Friday, January 4, 2013 5:00:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We have posted a new build that should be able to read those files. Please see your private message for the download location of the new build.

Thanks!


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.