Copy Inner Field in C++
Contents
[
Hide
]
Use FormEditor for this task. The examples below retain the original C++ code and API Reference steps.
Copy inner field
Copy First Name to First Name Copy on page 2 at the specified coordinates.
- Create FormEditor.
- Bind the PDF input with Facade::BindPdf().
- Copy the field within the document with FormEditor::CopyInnerField().
- 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 CopyInnerField(String inputFile, String outputFile)
{
auto editor = MakeObject<FormEditor>();
editor->BindPdf(inputFile);
editor->CopyInnerField(u"First Name", u"First Name Copy", 2, 200, 600);
editor->SaveableFacade::Save(outputFile);
}
} // namespace Facades::Examples::PDF_FormEditor