Concatenate PDF Files
Contents[ Hide ]
Concatenating two files, that is, adding one to the end of another, involves opening both files and passing the pages of one to the target document.
To concatenate two PDF files:
- Create two Document objects, one for each input file. The document you want to add a file to will be called the target document. The file that will be added is called the source document.
- Call the Pages collection’s Add method on the target Document object.
- Pass the Pages collection of the source Document object to the target document’s Pages collection’s add method.
- Save the target PDF file with the save method.
The following code snippet shows how to concatenate PDF files.