Load/Save PDF documents using Aspose.PDF for .NET - Image is losing if PDF is an image

We are using the current 11.1 (and tried previous versions) and Aspose is having issues just saving a PDF that was opened if the PDF was an image.


This simple load/save fails with the attached document:

using (var memoryStream = new MemoryStream(fileBytes))
{
var document = new Document(memoryStream);

using (var outputStream = new MemoryStream())
{
document.Save(outputStream);
return outputStream.ToArray();
}
}

This produces a blank PDF.

We cannot use a product that can’t process 1/2 our PDFs (scans converted to PDF).

P.S.

Grabbing the pages and adding to a new Document will save a PDF with the image, but causes other issues elsewhere.

using (var input = new MemoryStream(fileBytes))
{
using (var oldCopy = new Document(input))
{
using (var newCopy = new Document())
{
newCopy.Pages.Add(oldCopy.Pages);
using (var output = new MemoryStream())
{
newCopy.Save(output);
return output.ToArray();
}
}
}
}

Hi Michael,


Thanks for contacting support.

I have tested the scenario and have managed to reproduce the same problem that opening and re-saving the same file creates corrupted output. For the sake of correction, I have logged it as PDFNEWNET-40094 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Do we have a resolution on this issue yet?


Thanks,
Mike

Hi Michael,


Thank for your inquiry. I am afraid we have recently noticed the issue and yet it is pending for investigation in the queue. We will notify you as soon as we made some significant progress towards issue resolution progress.

We are sorry for the inconvenience caused.

Best Regards,