Merge documents to PDF
Introduction
Consider the functionality for merging files of various formats such as PDF, DOC, PPT and XLS into a PDF document. Let’s see, why do we need to combine these files into a PDF document? This article discusses the PDF format, but those ones will be more in the near future. But turn back to the PDF format. It is a standard format that allows you to display information the same on any device with any platform. It is comfortable for transferring info via the Internet or to a printer. That is why this format is chosen for the current task of combining files of various formats.
Merge documents to PDF
Multiple files (even different types of files such as DOC, PPT, XLS) can be combined into a single PDF file by using GroupDocs.Merger API. You can also use this join method to combine multiple PDF files. This cross-format merge to PDF could be useful for the cases when there is no ability to merge only PDF files. For now, GroupDocs.Merger API allows to join other file types without password with the PDF document loaded into Merger object.
The following example demonstrates how to merge PDF file with DOC, PPT and XLS file types:
Merger merger = new Merger("c:\document1.pdf");
{
merger.join("c:\document2.doc");
merger.join("c:\document3.ppt");
merger.join("c:\document4.xls");
merger.save("c:\merged.pdf");
}
More resources
Advanced Usage Topics
To learn more about document merging features, please refer the advanced usage section.
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples:
- GroupDocs.Merger for .NET examples, plugins and showcase
- GroupDocs.Merger for Java examples, plugins and showcase
Free Online App
Along with full featured .NET library we provide simple, but powerful free Apps.
You are welcome to merge your documents with our free online GroupDocs Merger App.