Split PDF to End in C++
Contents
[
Hide
]
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.
- Create PdfFileEditor.
- 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