pdftk
pdftk copied to clipboard
fill_form garbles input text for fields using embedded TrueType font
For context, I used Apache PDFBox to embed a TrueType font (Lato-Regular) into my input PDF, and set that font onto all the text fields on my 1-page PDF document. Using fill_form, I set test values on the text fields.
However, my output document shows these weird rectangular boxes in the values for my text boxes like so:
Oddly enough, if I click on any of the fields, the expected font and text does show up on the text field. Upon focusing out of the field, the rectangular box comes back.
I've used dump_data_fields_utf8
to check that the values are consistent with that of dump_data_fields
. On my original PDF, I've set needAppearances
on the acroForm
such that fields should regenerate their appearances when opened. I've also sent that option during pdf filling when invoking PDFtk. Not sure how this issue can be fixed and am looking for suggestions.
PDFtk version: 2.01 Input PDF: http://www.filedropper.com/prefilled Output PDF with weird font: http://www.filedropper.com/output_1