Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.0.7
-
None
-
None
Description
Documentation for PDAcroForm.flatten(List<PDField>, boolean) says "This will flatten the specified form fields".
But the following code works same as PDAcroForm.flatten() though excepted to flatten only one field.
PDDocument document = PDDocument.load(new File("/flatten_fields.pdf")); PDAcroForm acroForm = document.getDocumentCatalog().getAcroForm(); List<PDField> fields = new ArrayList<>(); fields.add(acroForm.getField("flatten")); acroForm.flatten(fields, true); document.save("/flatten_result.pdf"); document.close();
Attachments
Attachments
Issue Links
- is duplicated by
-
PDFBOX-3809 PDAcroForm.flatten(PDField list, refreshAppearances boolean) flattens all form fields instead of specified ones.
- Closed