Received error on opening PDF file - "An attempt was made to move the position before the beginning of the stream."

using the following code, received the error - An attempt was made to move the position before the beginning of the stream - upon attempt to open the attached file.

static bool SavePdfFile(string oldName)
{
bool saveStatus;
var newName = oldName.Replace("Inbox", "Batch");
var newFileInfo = new FileInfo(newName);
newName = newName.Replace(newFileInfo.Extension, "_pgnum.tif");

try
{
var savePdfDocument = new Aspose.Pdf.Document(oldName);

var resolution = new Resolution(200);
var tiffSettings = new TiffSettings
{
Compression = CompressionType.CCITT4,
Depth = ColorDepth.Default,
Shape = ShapeType.None,
SkipBlankPages = true
};

var tiffDevice = new TiffDevice(resolution, tiffSettings);
var pages = savePdfDocument.Pages;
var pgCount = pages.Count;

for (int pg = 1; pg < pgCount + 1; pg++)
{
var saveName = newName.Replace("_pgnum", "_" + pg.ToString("00"));
tiffDevice.Process(savePdfDocument, pg, pg, saveName);
}
savePdfDocument.Dispose();
saveStatus = true;
}
catch (Exception exc)
{
Console.WriteLine("Exception converting PDF Doc to TIF - {0}", exc.Message);
Log.Error(oldName, "Exception converting PDF Doc to TIF", exc.Message);
saveStatus = false;
}
GC.Collect();

return saveStatus;
}

Hi Steve,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code and template file.

I am able to reproduce your mentioned issue after an initial test. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-34458. We will notify you via this forum thread regarding any updates.

Sorry for the inconvenience,

The issues you have found earlier (filed as PDFNEWNET-34458) have been fixed in Aspose.Pdf for .NET 7.5.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as PDFNEWNET-34458) have been fixed in Aspose.Pdf for .NET 7.6.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

I’ve loaded the update and some of our files are still receiving this error. See file attached to this reply.

Hi Steve,


In latest release version of Aspose.Pdf for .NET 7.6.0 we have fixed the issues related to documents shared earlier. However for other documents, this exception might occur due to the complexity and structure of the input document. I have separately logged this issue as PDFNEWNET-34657 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time.

If you notice the problem with other PDF files, please share those documents so that we can further investigate the reasons of this problem. We are sorry for this inconvenience.

The issues you have found earlier (filed as PDFNEWNET-34657) have been fixed in Aspose.Pdf for .NET 7.7.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as PDFNEWNET-34657) have been fixed in Aspose.Pdf for .NET 7.7.0.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(1)