Getting Invalid PDF File. %%EOF not found. when trying to open a PDF

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v10)  /  Getting Invalid PDF File. %%EOF not found. when trying to open a PDF

DynamicPDF CoreSuite for .NET (v10) Forum

I am trying to open a PDF usign CoreSuite 10.29 and am getting the following Parsing Exception. 

Invalid PDF File. %%EOF not found.

However in an older version of DynamicPDF it opened just fine.  I am using a memory stream to try and open.  I can open the PDF fine in Acrobat Reader.  Does anyone have ideas as to what might be going on here?

Ken
Posted by a ceTe Software moderator
Hi Ken,

Is the MemoryStream's position at the beginning of the stream? If not, make sure you are at the beginning of the stream before passing it to DynamicPDF. Also, will it load if you use a file instead of a MemoryStream?

Thanks,
ceTe Software Support Team
I think I found the issue.  If I  take the memory stream and call the ToArray() method on it everything works fine.  It just surprised me because the older version of Dynamic PDF everything worked fine and now some of our forms don't seem to be working with the same code.  I have found a work around, but I may need to go back and test every form we have already tested.  Thank you for the quick reply.

Ken

All times are US Eastern Standard time. The time now is 11:23 PM.