Split PDF to End in C++

Use PdfFileEditor for this task. The examples below retain the original C++ code and API Reference steps.

Split PDF to end

Write pages from page 2 through the end to a new PDF.

  1. Create PdfFileEditor.
  2. Write the ending page range with PdfFileEditor::SplitToEnd().
#include <Aspose.PDF.Cpp/Facades/PdfFileEditor.h>
#include <system/string.h>

namespace  Facades::Examples::PDF_FileEditor
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;

void SplitPdfToEnd(String inputFile, String outputFile)
{
    auto pdfFileEditor = MakeObject<PdfFileEditor>();
    pdfFileEditor->SplitToEnd(inputFile, 2, outputFile);
}
} // namespace  Facades::Examples::PDF_FileEditor