Removing a page corrupts PDF

Using Aspose 6.7 or 6.8 with .NET 4.0
On certain PDFs, such as the attached sample, removing a page from the PDF causes the pdf to become corrupted and unusable by Adobe Reader which displays the error:

"There was an error opening this document. There was a problem reading this document (118)."

Code:
private static void RemovePageIssue2()
{
string pdfPath = “removePageIssue2.pdf”;
string outfile = “removePageIssue2out.pdf”;
using (var pdfDoc = new Aspose.Pdf.Document(pdfPath))
{


pdfDoc.Pages.Delete(pdfDoc.Pages.Count - 1);

pdfDoc.Save(outfile);
Console.WriteLine(“removePageIssue2out - check with adobe to see if it is corrupted”);

}

}


The error changes if you delete page 1 instead of the last page also. (ie, pdfDoc.Pages.Delete(1) instead of Count-1)

In any event, you end up with adobe reader error:
"There was a problem reading this document (14). on this particular sample in that case.

Hi Dan,

Thanks for sharing the sample source code and template documents with us. I tested the scenario and able to notice the same problem. For rectification, I logged this problem with ID: PDFNEWNET-33512 in our Issue Tracking System. We will further look into the details of this issue and will keep you updated via this forum thread on the status of correction.

We apologize for your inconvenience.

Thanks & Regards,

Hi Dan,

Thank you for your patience.

I am very pleased to inform you that the issue is resolved by the development team and this issue will be a part of Aspose.Pdf for .NET v7.1 (to be released in June as per our monthly release plan) after following the complete testing and release cycle. Please be patient and we will notify you once the version is available for download.

We apologize for your inconvenience.

Thanks & Regards,

The issues you have found earlier (filed as PDFNEWNET-33512) have been fixed in this update.


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