Set Submit URL

Set a submit URL

  1. Bind the source PDF to the FormEditor facade.
  2. Call setSubmitUrl(...) for the button field.
  3. Apply the submit flag for the submission format.
  4. Save the updated document.
public static void setSubmitUrl(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.setSubmitUrl("Script_Demo_Button", "http://www.example.com/submit");
        editor.setSubmitFlag("Script_Demo_Button", SubmitFormFlag.Xfdf);
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}