Create Submit Button
Contents
[
Hide
]
Use FormEditorExamples.createSubmitButton(...) to create a button that submits form data.
Create a submit button
- Bind the source PDF to the
FormEditorfacade. - Call
addSubmitBtn(...)with the button name, page, label, target URL, and rectangle. - 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();
}
}