Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aspose-com-gists/ce1d65d598688f0845b5f4297542090e to your computer and use it in GitHub Desktop.
Save aspose-com-gists/ce1d65d598688f0845b5f4297542090e to your computer and use it in GitHub Desktop.
How to Delete Blank Pages in Word - A Complete Guide
using Aspose.Words;
// Load a document
Document doc = new Document("Document.docx");
// Remove all the blank pages
doc.RemoveBlankPages();
// Save the updated document
doc.Save("Document_out.docx");
// Load a document
Document doc = new Document("Dcoument.docx");
// Remove all the blank pages
doc.removeBlankPages();
// Save the updated document
doc.save("Document_out.docx")
import aspose.words as aw
# Load a document
doc = aw.Document("Document.docx")
# Remove all the blank pages
doc.remove_blank_pages()
# Save the updated document
doc.save("Document_out.docx")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment