Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save conholdate-gists/a00735d92095357e41ebffd51ac75abb to your computer and use it in GitHub Desktop.
Save conholdate-gists/a00735d92095357e41ebffd51ac75abb to your computer and use it in GitHub Desktop.
Combine Multiple Documents into A Single PDF File in C# .NET

Merge Word, Excel & PowerPoint Files into One PDF in .NET

The below C# .NET code example demonstrates how to merge multiple popular document types such as Word (DOC/DOCX), Excel Spreadsheet (XLS/XLSX) and PowerPoint (PPT/PPTX) into a single PDF file without disturbing the document formatting and layout. It makes easier for the end users to view the merged PDF file in any PDF viewer; requiring no other applications or Microsoft Office installed on the devices.

View a list of all supported document formats that can be merged efficiently within any type of .NET application.

APIs to Use

Installation

Download GroupDocs.Merger APIs from https://downloads.conholdate.com/total/net or install the whole package directly from Nuget https://www.nuget.org/packages/Conholdate.Total/ into your workplace.

More About .NET Documents Merger API

Home | Product Page | Docs | New Releases | API Reference | Examples | Blog | Free Support | Temporary License | About Us

// Supports merging Microsft Word, Excel, PowerPoint, Visio, OpenDocument, HTML, eBook and PostScript file formats
// Supported file formats: https://docs.groupdocs.com/merger/net/supported-document-formats/
using (Merger merger = new Merger("input.pdf"))
{
merger.Join("word-document.doc");
merger.Join("excel-document.xls");
merger.Join("powerpoint-document.ppt");
merger.Save("merged.pdf");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment