-
Notifications
You must be signed in to change notification settings - Fork 1
Merge the Whole PDF
Youna edited this page Mar 8, 2023
·
3 revisions
ComPDFKit PDF SDK allows you to instantiate multiple CPDFDocument, and you can use the CPDFDocument API to merge two or more PDF files into a single one.
See all details here.
To merge PDF documents into one file, please use the following method:
CPDFDocument document = CPDFDocument.CreateDocument();
// File path
CPDFDocument document1 = CPDFDocument.InitWithFilePath("filePath");
// File path
CPDFDocument document2 = CPDFDocument.InitWithFilePath("filePath2");
- Merge all the pages from the documents you just opened, and import them into the blank PDF document.
document.ImportPagesAtIndex(document1,"",document.PageCount); document.(document2,"",document.PageCount);
- Save the document.
// Save path document.WriteToFilePath("savePath");
Contact ComPDFKit.