Create Submit Button

Use FormEditorExamples.createSubmitButton(...) to create a button that submits form data.

Create a submit button

  1. Bind the source PDF to the FormEditor facade.
  2. Call addSubmitBtn(...) with the button name, page, label, target URL, and rectangle.
  3. Save the updated document.
public static void createSubmitButton(Path inputFile, Path outputFile) {
    FormEditor editor = new FormEditor();
    try {
        editor.bindPdf(inputFile.toString());
        editor.addSubmitBtn("submitbutton", 1, "Submit", "http://localhost/testing/show", 100, 450, 150, 475);
        editor.save(outputFile.toString());
    } finally {
        editor.close();
    }
}