Merge files

GroupDocs.Merger for Python via .NET lets you combine multiple documents of the same family into a single output file with just a few lines of Python code. All content — text, images, tables, graphs, forms, and embedded objects — is faithfully preserved in the result.

The library handles the complexities of each file format internally, so you do not need to understand proprietary format internals or rely on any third-party desktop software. The API is identical regardless of format: load the base document with Merger, call join once for every additional file, then call save.

Note

Try online

You can try merging files online and download the results for free using GroupDocs.Merger Live Demo.

Steps to merge documents

  1. Install the package: pip install groupdocs-merger-net.
  2. Import Merger from groupdocs.merger.
  3. Open the first (base) document with Merger("./input.<ext>") inside a with block.
  4. Call merger.join("./input2.<ext>") for each additional document to append.
  5. Call merger.save("./output.<ext>") to write the combined result.

Supported formats

See the full list in Supported Document Formats.

Per-format guides

Choose the guide for the format you want to merge:

See also