Split PDF into Single Pages in C++
Contents
[
Hide
]
Use PdfFileEditor for this task. The examples below retain the original C++ code and API Reference steps.
Split PDF into single pages
Split the PDF into individual pages using outputFilePattern.
- Create PdfFileEditor.
- Write individual page files with PdfFileEditor::SplitToPages().
#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 SplitPdfIntoSinglePages(String inputFile, String outputFilePattern)
{
auto pdfFileEditor = MakeObject<PdfFileEditor>();
pdfFileEditor->SplitToPages(inputFile, outputFilePattern);
}
} // namespace Facades::Examples::PDF_FileEditor