Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.10
-
None
-
win10, JDK 1.8
Description
Pdf form sampleform_filled.pdf contains one field called "txtField" with this content: "ěščřžýáíéúůóďťĚŠČŘŽÝÁÍÉÚŮÓĎŤ". The font used in this field is "/F5"
when you run this code:
try { PDDocument sourcePdfForm = PDDocument.load(new File("sampleform_filled.pdf")); PDAcroForm acroForm = sourcePdfForm.getDocumentCatalog() .getAcroForm(); acroForm.flatten(); sourcePdfForm.save("sampleform_filled_flattened.pdf"); } catch (IOException e) { e.printStackTrace(); }
You will get sampleform_filled_flattened.pdf with empty or not visible content of the field.