Set Submit URL in C++
Contents
[
Hide
]
Use FormEditor for this task. The examples below retain the original C++ code and API Reference steps.
Set submit URL
Configure Script_Demo_Button to submit XFDF to the sample HTTPS endpoint.
- Create FormEditor.
- Bind the PDF input with Facade::BindPdf().
- Set the submission endpoint with FormEditor::SetSubmitUrl().
- Set the submission format with FormEditor::SetSubmitFlag().
- Save the resulting PDF with SaveableFacade::Save().
#include <Aspose.PDF.Cpp/Facades/FormEditor.h>
#include <Aspose.PDF.Cpp/Facades/SubmitFormFlag.h>
#include <system/string.h>
namespace Facades::Examples::PDF_FormEditor
{
using namespace System;
using namespace Aspose::Pdf;
using namespace Aspose::Pdf::Facades;
void SetSubmitUrl(String inputFile, String outputFile)
{
auto editor = MakeObject<FormEditor>();
editor->BindPdf(inputFile);
editor->SetSubmitUrl(u"Script_Demo_Button", u"https://www.example.com/submit");
editor->SetSubmitFlag(u"Script_Demo_Button", SubmitFormFlag::Xfdf);
editor->SaveableFacade::Save(outputFile);
}
} // namespace Facades::Examples::PDF_FormEditor