Remove PDF Bates numbering in C++
Contents
[
Hide
]
Pass the entire document page collection to DeleteBatesNumbering(). Unlike the first-page artifact examples, this function processes Bates numbering across the document.
Configure the SDK and choose a writable output path.
Delete Bates numbering
Remove Bates numbering through the page collection extension method.
- Open the input PDF with Document.
- Pass the document pages to PageCollectionExtensions::DeleteBatesNumbering().
- Save the result with Document::Save().
#include <Aspose.PDF.Cpp/Document.h>
#include <Aspose.PDF.Cpp/Page.h>
#include <Aspose.PDF.Cpp/PageCollection.h>
#include <Aspose.PDF.Cpp/Artifacts/Artifact.h>
#include <Aspose.PDF.Cpp/Artifacts/ArtifactCollection.h>
using namespace System;
using namespace Aspose::Pdf;
#include <Aspose.PDF.Cpp/Artifacts/Pagination/PageCollectionExtensions.h>
void DeleteBatesNumbering(System::String inputFile, System::String outputFile)
{
auto document = MakeObject<Document>(inputFile);
PageCollectionExtensions::DeleteBatesNumbering(document->get_Pages());
document->Save(outputFile);
}