Hi, I’m trying to open a pdf document using Aspose.Pdf.Document (.Net) to generate preview images. Unfortunately the first step - when I pass the stream to the constructor - fails.
Unable to read beyond the end of the stream.
at .?..ctor(Stream , String , Boolean )
at .?..ctor(Stream )
at ..?(Stream )
at .…ctor(Stream )
at Aspose.Pdf.Document.?(Stream , String )
at Aspose.Pdf.Document…ctor(Stream input)
The strange thing is that it worked with the previous version of Aspose.Pdf, but after we upgraded to the latest version, it fails with all of my test files.
Thanks for contacting support.
Can you please share the resource PDF file and the code snippet which you are using so that we can test the scenario at our end. We are sorry for this inconvenience.
Hi, I encounter the same error with any pdf. I attached one of them, it is an MS spec file.
The code is simple, I try to create a document object:
var document = new Document(docStream);
I see that Aspose.Pdf reads the stream heavily (sometimes byte-per-byte, and even seeks backwards) but this should not be a problem (the stream is our custom stream implementation but it works with every other file type we need). Somehow at one point it sets the position beyond the end of the stream.
(we use Aspose.Pdf 126.96.36.199)
Thanks for sharing the resource file.
I have tested the scenario where I have used the following code line to read the PDF document with Aspose.Pdf for .NET 8.2.0 in VisualStudio 2010 application, running over Windows 7(X64) and I am unable to notice any problem. Can you please share the code snippet which you are using to read the PDF stream, so that we can test that scenario at our end. We are sorry for your inconvenience.
Document pdfDocument = new