Merge TIFF to PDF in C++

Use Aspose.Slides for C++ to combine TIFF images and save the result as PDF.

Merge TIFF to PDF using Aspose.Slides

Aspose.Slides for C++ is a C++ API for working with presentations, images, and PDF output. You can add TIFF images to a slide as picture frames and save the presentation as a PDF file.

Merge TIFF to PDF in C++

Using Aspose.Slides for C++ , you can merge TIFF images by adding them with AddImage and AddPictureFrame, then saving the presentation with SaveFormat::Pdf.

C++ code for merging TIFF to PDF

auto presentation = MakeObject<Presentation>();
auto slide = presentation->get_Slide(0);

auto firstImageData = File::ReadAllBytes(u"first.tiff");
auto firstImage = presentation->get_Images()->AddImage(firstImageData);
slide->get_Shapes()->AddPictureFrame(ShapeType::Rectangle, 0, 0, 320, 240, firstImage);

auto secondImageData = File::ReadAllBytes(u"second.tiff");
auto secondImage = presentation->get_Images()->AddImage(secondImageData);
slide->get_Shapes()->AddPictureFrame(ShapeType::Rectangle, 0, 260, 320, 240, secondImage);

presentation->Save(u"merged.pdf", SaveFormat::Pdf);
presentation->Dispose();

How to merge TIFF to PDF in C++

  1. Install Aspose.Slides for C++. See Installation .

  2. Add the library as a reference in your project.

  3. Create a Presentation instance and access the slide.

  4. Add the source TIFF files with AddImage and place them with AddPictureFrame.

  5. Save the merged file with SaveFormat::Pdf.

Merge Files Online

Merge presentations, documents, and images online.