Merge Different File Formatted Documents Into A Single PDF

Why merge different documents?

There are a lot of common yet crucial reasons to merge documents. Let's understand the need with some use-cases.
Real estate
When you buy or lease a property, you have to go through a lot of documentation (e.g. mortgage, loan application, agreements, various expense recordings). Such documentation is mostly recorded in multiple file formats (e.g. PDF, Word, Excel, Presentation). Wouldn't it be super if you could compile all the documents into a single understandable format such as PDF?
Archived documents
Most of the time we have a lot of electronic documents saved in various formats. They all have similar content and need to be combined. For example Excel file with charts, or Word file swith some formatted text. These details could be combined in a single PDF. Eventually, you can share this resultant PDF with colleagues or print it without any issue.

Merge documents to PDF

Let's see how we merge DOC, PPT, XLS and PDF files into a single PDF.
  1. using (Merger merger = new Merger(@"c:\document1.pdf"))  
  2. {  
  3.     merger.Join(@"c:\document2.doc");  
  4.     merger.Join(@"c:\document3.ppt");  
  5.     merger.Join(@"c:\document4.xls");  
  6.     merger.Save(@"c:\merged.pdf");  
  7. }  
Download the DLL and add it as a reference in your .NET project (existing or new). However, in case of any issue, post it here.