GroupDocs.Merger for Python via .NET lets you rearrange, filter, and transform individual pages within a single document — without merging multiple files. Use the operations below to build page-level document processing pipelines entirely in Python.
The snippet below loads a PDF, removes page 2, and saves the result — illustrating the common pattern shared by all single-document operations.
fromgroupdocs.mergerimportMergerfromgroupdocs.merger.domain.optionsimportRemoveOptionsdefquick_remove_page():# Load the source documentwithMerger("./input.pdf")asmerger:# Remove page 2merger.remove_pages(RemoveOptions([2]))# Save the modified documentmerger.save("./output.pdf")if__name__=="__main__":quick_remove_page()
Tip
All single-document operations follow the same three-step pattern: load with Merger, call the operation method, then save with merger.save().