Move Field in C++

Contents
[ ]

Use FormEditor for this task. The examples below retain the original C++ code and API Reference steps.

Move field

Move Country to the rectangle (200, 600, 280, 620).

  1. Create FormEditor.
  2. Bind the PDF input with Facade::BindPdf().
  3. Set the field rectangle with FormEditor::MoveField().
  4. Save the resulting PDF with SaveableFacade::Save().
#include <Aspose.PDF.Cpp/Facades/FormEditor.h>
#include <system/string.h>

namespace Facades::Examples::PDF_FormEditor
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;

void MoveField(String inputFile, String outputFile)
{
    auto editor = MakeObject<FormEditor>();

    editor->BindPdf(inputFile);
    editor->MoveField(u"Country", 200, 600, 280, 620);
    editor->SaveableFacade::Save(outputFile);
}
} // namespace Facades::Examples::PDF_FormEditor