Using Aspose.Words for .Net
I have an RTF document that is appearing with a blank 2nd page. Even if I remove the blank paragraph that is after the last table, the PageCount is still 2 and when exported as a PDF the blank page shows up.
Test File: Blank 2nd Page Document.zip (11.8 KB)
Here’s how the issue can be reproduced:
var document = new Document(@"Blank 2nd Page Document.rtf"); // page count is 2 document.LastSection.Body.LastChild.Remove(); document.LastSection.Body.Remove(); document.LastSection.Remove(); // page count is still 2 document.Save(@"Blank 2nd Page Document.pdf");
What’s needed to remove any trailing blank pages please?