Single-Line Field to Multi-Line Field in C++

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

Single to multiple

Convert City from a single-line field to a multiline field.

  1. Create FormEditor.
  2. Bind the PDF input with Facade::BindPdf().
  3. Enable multiline input with FormEditor::Single2Multiple().
  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 SingleToMultiple(String inputFile, String outputFile)
{
    auto editor = MakeObject<FormEditor>();

    editor->BindPdf(inputFile);
    editor->Single2Multiple(u"City");
    editor->SaveableFacade::Save(outputFile);
}
} // namespace Facades::Examples::PDF_FormEditor