I tried this code on the 3.0 version on the SourceFailure.pdf file.
PDAcroForm acroForm = doc.getDocumentCatalog().getAcroForm();
List<PDField> list = new ArrayList<>();
for (PDField field : acroForm.getFieldTree())
{
list.add(field);
}
acroForm.flatten(list, true);
and after saving I got a fully flattened file. Please try that with
2.0.24. Your zip file needs us to analyse > 500 lines of code and set up
a project with dependencies.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]