Merge Documents into PDF
Contents
[
Hide
]
Merge Documents into PDF in Java
GroupDocs.Merger for Java (which is a part of Conholdate.Total for Java) allows to merge Multiple files (even different types of files such as DOC, PPT, XLS) can be combined into a single PDF / XPS file by using GroupDocs.Merger API. You can also use this Join method to combine multiple PDF / XPS files. This cross-format merge to PDF / XPS could be useful for the cases when there is no ability to merge only PDF / XPS files. For now, GroupDocs.Merger API allows to Join other file types without password with the PDF / XPS 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");
}