Skip to content

Commit

Permalink
Update test to work with PDFBOX 2.0.22 getAcroForm.
Browse files Browse the repository at this point in the history
This works around the changes in behavior of getAcroForm which were part of:
https://issues.apache.org/jira/browse/PDFBOX-4985
  • Loading branch information
danfickle committed Dec 20, 2020
1 parent d3802bc commit 4bd4031
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,9 @@ public void testFormControlAfterOverflowPage() throws IOException {
@Test
public void testInputWithoutNameAttribute() throws IOException {
PDDocument doc = run("input-without-name-attribute");
PDAcroForm form = doc.getDocumentCatalog().getAcroForm();
// Note: As of PDFBOX 2.0.22 we have the option of recreating
// the acro form from the widgets. We pass null to avoid this behavior.
PDAcroForm form = doc.getDocumentCatalog().getAcroForm(null);
assertEquals(0, form.getFields().size());
remove("input-without-name-attribute", doc);
}
Expand Down

0 comments on commit 4bd4031

Please sign in to comment.