A completed PDF form can be received in a Spring Boot controller and its submitted fields read with the Forms API.

Parse the submission and read fields.
StiPdfFormSubmission submission = new StiPdfFormSubmission();
submission.parseXFDF(data);   // data = raw request bytes

String name  = submission.getStringValue("CustomerName");
String email = submission.getStringValue("CustomerEmail");
Date   date  = submission.getDateTimeBoxValue("OrderDate", "MM/dd/yyyy");
String ship  = submission.getSingleSelectionValue("DeliveryMethod");
Read table rows.
int rows = submission.getTableRowsCount("OrderItems");
int cols = submission.getTableColumnsCount("OrderItems");
for (int y = 0; y < rows; y++)
    for (int x = 0; x < cols; x++)
        System.out.print(submission.getTableFieldValue("OrderItems", x, y) + "|");

How it works. The submission is parsed once into a typed accessor, so every field and table cell of the returned form is available server-side.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.