PdfDocumentPageCollection does not have RemoveAt method as stated in documentation.
For my specific purpose bettor solution would be to make page blank.
PdfPageBase has IsBlank property, but there is no actual method to make page blank there.
I need to remove page, or completely remove everything already drawn on the page.
fPdfDocumentPageCollection does not have RemoveAt(pageindex)
|
//Create an instance of PdfDocument
using (PdfLoadedDocument loadedDocument = new PdfLoadedDocument(file))
{
//Remove the second page in the PDF document
loadedDocument.Pages.RemoveAt(1);
loadedDocument.Pages.Insert(1);
MemoryStream stream = new MemoryStream();
//Save and close the document
loadedDocument.Save(stream);
File.WriteAllBytes("../../../Output.pdf", stream.ToArray());
} |
I am using latest 19.169 verson. There is no RemoveAt method listed on PdfLoadedPageCollection class: