Aspose hangs during processing PDF to TIF imaging

using Aspose.PDF.NET version 7.7 and the following code, module converted 5 of 8 pages and then hung while converting the 6th page and would not finish.

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 Elizabeth,


Thanks for your inquiry, I’ve managed
to reproduce the issue at my end and logged it as
PDFNEWNET-35068 in our issue tracking system for further
investigation and resolution. We will keep you updated regarding issue status
via this thread.


Sorry for the inconvenience faced.

Best Regards,

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.