Artem Logachev created PDFBOX-3941:
--------------------------------------
Summary: PDAcroForm.flatten(List<PDField>, boolean) works
incorrectly
Key: PDFBOX-3941
URL: https://issues.apache.org/jira/browse/PDFBOX-3941
Project: PDFBox
Issue Type: Bug
Components: AcroForm
Affects Versions: 2.0.7
Reporter: Artem Logachev
Attachments: flatten_fields.pdf, flatten_result.pdf
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.
{code:java}
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();
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]