Split PDF from Beginning in C++
Contents
[
Hide
]
Use PdfFileEditor for this task. The examples below retain the original C++ code and API Reference steps.
Split PDF from beginning
Write the first three pages to a new PDF.
- Create PdfFileEditor.
- Write the first page range with PdfFileEditor::SplitFromFirst().
#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 SplitPdfFromBeginning(String inputFile, String outputFile)
{
auto pdfFileEditor = MakeObject<PdfFileEditor>();
pdfFileEditor->SplitFromFirst(inputFile, 3, outputFile);
}
} // namespace Facades::Examples::PDF_FileEditor