Move Stamp By ID in C++
Contents
[
Hide
]
Use PdfContentEditor for this task. The examples below retain the original C++ code and API Reference steps.
Move stamp by id
Move stamp ID 1 on page 1 to (200, 200).
- Create PdfContentEditor.
- Bind the PDF input with Facade::BindPdf().
- Move the stamp by identifier with PdfContentEditor::MoveStampById().
- Save the resulting PDF with PdfContentEditor::
Save().
#include <Aspose.PDF.Cpp/Facades/PdfContentEditor.h>
#include <system/string.h>
namespace Facades::Examples::PDF_ContentEditor
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
void MoveStampById(String inputFile, String outputFile)
{
auto pdfContentEditor = MakeObject<PdfContentEditor>();
pdfContentEditor->BindPdf(inputFile);
int pageId = 1;
int stampId = 1;
double x = 200;
double y = 200;
pdfContentEditor->MoveStampById(pageId, stampId, x, y);
pdfContentEditor->Save(outputFile);
}
} // namespace Facades::Examples::PDF_ContentEditor