List Stamps in C++
Contents
[
Hide
]
Use PdfContentEditor for this task. The examples below retain the original C++ code and API Reference steps.
List stamps
Print the number of stamps returned for page 1.
- Create PdfContentEditor.
- Bind the PDF input with Facade::BindPdf().
- Read page stamp information with PdfContentEditor::GetStamps().
- Print the results or diagnostic messages shown in the example.
#include <Aspose.PDF.Cpp/Facades/PdfContentEditor.h>
#include <Aspose.PDF.Cpp/Facades/StampInfo.h>
#include <drawing/image.h>
#include <iostream>
#include <system/string.h>
namespace Facades::Examples::PDF_ContentEditor
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
void ListStamps(String inputFile)
{
auto editor = MakeObject<PdfContentEditor>();
editor->BindPdf(inputFile);
auto stamps = editor->GetStamps(1);
std::cout << "Stamps on page 1: " << stamps->get_Length() << std::endl;
}
} // namespace Facades::Examples::PDF_ContentEditor