Stack Overflow processing PDF using TIFF device

Stack Overflow error occuring on processing PDF to TIF. See attached file and code. Please note that this error is escaping the catch being used.

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 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-34398. You will be notified via this forum thread regarding any update against your reported issue.

Sorry for the inconvenience,

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


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