Overview of GroupDocs.Merger for Python

A versatile API for merging, splitting, rearranging, and refining documents, slides, and diagrams in Python applications.

Illustration merger

Merge documents with ease in Python

Effortlessly combine PDF and Office documents into a single file using GroupDocs.Merger for Python. With extensive format support, this library ensures seamless integration and merging of various file types, simplifying document management in Python applications.

Simplify document handling by segmenting large files

Easily split large PDF or Office files into smaller, more manageable sections with GroupDocs.Merger for Python. Customize your documents by dividing them based on specific pages, ranges, or extracting individual pages, improving organization and workflow efficiency.

Gain full control over your document’s structure in Python

Easily rearrange, swap, or remove pages to customize your document layout using GroupDocs.Merger for Python. Adapt your files to meet specific requirements, offering unmatched flexibility in creating tailored document structures.

Platform independence

GroupDocs.Merger for Python is built to operate smoothly across multiple operating systems, frameworks, and package managers, providing versatility and compatibility for your development environment.

Amazon
Docker
Azure
Eclipse
IntelliJ
Windows
Linux
Maven

Supported file formats

GroupDocs.Merger for Python via .NET enables seamless operations with a variety of file formats, ensuring flexibility for your document management tasks.

Microsoft Office formats

  • Word: DOC, DOCX, DOCM, DOT, DOTX, DOTM, RTF, TXT
  • Excel: XLS, XLSX, XLSM, XLSB, XLTM, XLTX, XLT, XLAM
  • PowerPoint: PPT, PPTX, PPS, PPSX, ODP, OTP
  • Visio: VSDX, VSDM, VSSX, VSTX, VSTM, VSSM, VSX, VTX, VDX

Documents & images

  • Documents: PDF, XPS, TEX
  • Images: BMP, JPEG, PNG, GIF, TIFF, SVG, PS
  • OpenDocument: ODT, OTT, ODS
  • eBook: EPUB

Other formats

  • Web: HTML, MHTML, MHT
  • Archives: ZIP, TAR, RAR, 7Z, BZ2, GZ
  • OneNote: ONE

Key Features of GroupDocs.Merger for Python

Simplify document handling by merging, splitting, and editing PDF and Office files seamlessly with GroupDocs.Merger in a Python environment.

Feature icon

Seamless document combination

Combine multiple documents into one by selecting specific pages or ranges from various files using GroupDocs.Merger for Python.

Feature icon

Document splitting capabilities

Divide large documents into smaller, more manageable files with the advanced splitting tools provided by GroupDocs.Merger for Python.

Feature icon

Efficient page movement

Reposition pages within a document to meet your needs using the intuitive MovePage feature in Python.

Feature icon

Page removal options

Easily remove unnecessary pages or specific page numbers with the RemovePages feature in GroupDocs.Merger for Python.

Feature icon

Page rotation functionality

Rotate pages to 90, 180, or 270 degrees with the straightforward RotatePages operation.

Feature icon

Page swapping feature

Reorganize your document by swapping the positions of pages using the SwapPages function in GroupDocs.Merger for Python.

Feature icon

Selective page extraction

Extract specific pages or ranges to create a new document, focusing only on the content you need with GroupDocs.Merger for Python.

Feature icon

Orientation alteration tool

Change the orientation of pages from portrait to landscape or vice versa using the ChangeOrientation feature in your Python projects.

Feature icon

Document page previews

Generate image previews of document pages to review their content and layout with the PreviewPages feature in Python.

Code samples

Discover common use cases for GroupDocs.Merger in Python. These examples show how to efficiently merge and split documents using GroupDocs.Merger for Python.

Merge multiple DOCX files into one document in Python

GroupDocs.Merger for Python lets you easily combine multiple DOCX files into a single document. With the Merge Word Documents feature, you can streamline document management and improve productivity. Below is a Python code snippet demonstrating the merging process:

Example: Merging DOCX files in Python

import groupdocs.merger as gm

def run():

    # Load the first DOCX file
    with gm.Merger("sample1.docx") as merger:

        # Add more DOCX files to merge
        merger.join("sample2.docx")

        # Merge the DOCX files and save the result
        merger.save("merged.docx")

Split a PDF document into multiple files in Python

With GroupDocs.Merger for Python, you can split large PDF documents into smaller files effortlessly. The Split Document feature allows you to extract specific pages based on criteria such as page range, start/end pages, or odd/even pages. This feature helps organize large documents by breaking them into smaller, more manageable files.

How to split a PDF into separate files in Python

import groupdocs.merger as gm

def run():

    # Use GroupDocs.Merger for Python to split the PDF file
    filePath = "input.pdf"
    filePathOut = "output.pdf"

    # Define SplitOptions with the desired output format
    splitOptions = gm.domain.options.SplitOptions(filePathOut, [ 3, 6, 8 ])

    # Initialize the Merger with the input PDF document
    with gm.Merger(filePath) as merger:

        # Call the split method with the SplitOptions object to generate separate files
        merger.split(splitOptions)

Ready to get started?

Download GroupDocs.Merger for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English