Welcome Guest Search | Active Topics | Sign In | Register

new EO.Pdf.PdfDocument from stream error Options
Mark
Posted: Wednesday, April 1, 2020 6:33:40 PM
Rank: Newbie
Groups: Member

Joined: 4/1/2020
Posts: 1
Creating a PdfDocument from a stream (in order to merge with a pdf created by HTMLToPDf) throws an exception "Property 'Pages' cannot be null". I'm creating the stream from a byte array. Downloading the same byte array as a PDF file through my site works fine.
eo_support
Posted: Thursday, April 2, 2020 9:29:59 AM
Rank: Administration
Groups: Administration

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

The most common cause for this is when you did not reset the Stream's position to the beginning before passing it to EO.Pdf. EO.Pdf would always read from the stream's current position. So if the PDF contents start from the beginning of the stream but the current position is at the middle of stream when you pass it to EO.Pdf, then you will run into errors.

If that's not the case, you can try to save the contents of the byte array to a file and send the file to us. We will check the file to see if we can find anything. See here for more information on how to send the file to us:

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

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.