Export to FDF in C++

Contents
[ ]

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

Export FDF

Export the bound form data to an FDF output stream.

  1. Create Form.
  2. Bind the PDF input with Facade::BindPdf().
  3. Write FDF data with Form::ExportFdf().
  4. Use the output stream as the exported data file.
#include <Aspose.PDF.Cpp/Facades/Form.h>
#include <system/io/file.h>
#include <system/io/file_stream.h>
#include <system/string.h>

namespace Facades::Examples::PDF_Form
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
using Form = Aspose::Pdf::Facades::Form;

void ExportFdf(String inputFile, String outputFile)
{
    auto form = MakeObject<Form>();
    auto outputStream = System::IO::File::Create(outputFile);

    form->Facade::BindPdf(inputFile);
    form->ExportFdf(outputStream);
}
} // namespace Facades::Examples::PDF_Form