Hello,
In our application we call the RemoveAt method of the PdfPageCollection class to remove a specified PDF page at a specified index (file size about 35 MB).
outputDocument.Pages.RemoveAt(pageCount - 1);
After solving a previous issue, that was preventing our program to arrive at the RemoveAt method before, we found that this method is throwing a NullReferenceException.
Stack trace:
System.NullReferenceException: Object reference not set to an instance of an object.
at Spire.Pdf.Widget.PdfPageCollection.ᜀ(Int32 A_0, PdfPageBase A_1)
at Spire.Pdf.Widget.PdfPageCollection.RemoveAt(Int32 index)
Are we using the method correctly? Or could there be an issue with the RemoveAt method in the PdfPageCollection that you know of? Please advise.
Thank you,
Aella