Merge PDF Files in C++
Use Aspose.Slides for C++ to combine PDF files in C++ applications.
Merge PDF to PDF using Aspose.Slides
Aspose.Slides for C++
is a C++ API for working with presentation content and PDF files. You can import multiple PDF files into a Presentation and save the combined result as a single PDF file.
Merge PDF to PDF in C++
Using
Aspose.Slides for C++
, you can merge PDF files by importing them with AddFromPdf and saving the presentation with SaveFormat::Pdf.
C++ code for merging PDF to PDF
auto presentation = MakeObject<Presentation>();
presentation->get_Slides()->RemoveAt(0);
presentation->get_Slides()->AddFromPdf(u"first.pdf");
presentation->get_Slides()->AddFromPdf(u"second.pdf");
presentation->Save(u"merged.pdf", SaveFormat::Pdf);
presentation->Dispose();
How to merge PDF files in C++
Install Aspose.Slides for C++. See Installation .
Add the library as a reference in your project.
Create a
Presentationinstance.Import the source
PDFfiles withAddFromPdf.Save the merged file with
SaveFormat::Pdf.
Merge Files Online
Merge presentations, documents, and images online.
Merge other files
You can also combine files in other formats.