GroupDocs.Merger for Python via .NET Overview
Leave feedback
On this page
What is GroupDocs.Merger?
GroupDocs.Merger for Python via .NET is a native Python library that merges, splits, and reorganises documents across 70+ supported formats — DOCX, PDF, XLSX, PPTX, images, Visio diagrams, eBooks, archives, and more. It runs entirely on-premise, requires no Microsoft Office or Adobe Acrobat installation, and ships as a pre-built wheel on Windows, Linux, and macOS.
Typical uses include:
Multi-document consolidation — assemble a single report or package from multiple source files in one API call.
Selective page merges — pull specific pages or page ranges from several documents and combine them into a new document.
Document assembly automation — build dynamic documents programmatically as part of batch or pipeline workflows.
Access control — protect sensitive documents with passwords and manage password changes or removal.
Page-level preparation — reorder, rotate, extract, or remove individual pages before a document reaches its final destination.
Key Capabilities
Capability
Description
Merge / Join
Combine two or more documents — or selected pages from them — into a single output file. See Merge Files.
Split
Divide a document into individual pages or multi-page segments by page list or interval. See Split Document.
Add, update, remove, or check document passwords without opening the document in an editor. See Security Operations.
Page Preview
Generate PNG, JPEG, or BMP thumbnail images of individual document pages. See Page Preview.
Document Inspection
Read file type, page count, page dimensions, and other metadata without modifying the document. See Get Document Information.
Quick Example
Merge two PDF files into a single document with just a few lines of code:
fromgroupdocs.mergerimportMergerdefmerge_pdf_documents():# Load the first PDF as the merge basewithMerger("./input.pdf")asmerger:# Append the second PDFmerger.join("./input2.pdf")# Save the merged PDFmerger.save("./output.pdf")if__name__=="__main__":merge_pdf_documents()
input.pdf is a sample file used in this example. Click here to download it.
input2.pdf is a sample file used in this example. Click here to download it.
For finer control, use the *JoinOptions classes to join only selected pages and preserve PDF bookmarks:
fromgroupdocs.mergerimportMergerfromgroupdocs.merger.domain.optionsimportPageJoinOptions,PdfJoinOptionsdefmerge_pdf_with_options():# Load the first PDF as the merge basewithMerger("./input.pdf")asmerger:# Append only pages 1 and 3 from the second PDFmerger.join("./input2.pdf",PageJoinOptions([1,3]))# Append a third PDF and preserve its bookmarkspdf_join=PdfJoinOptions()pdf_join.use_bookmarks=Truemerger.join("./input3.pdf",pdf_join)# Save the resultmerger.save("./output.pdf")if__name__=="__main__":merge_pdf_with_options()
input.pdf is a sample file used in this example. Click here to download it.
input2.pdf is a sample file used in this example. Click here to download it.
input3.pdf is a sample file used in this example. Click here to download it.