pdftk icon indicating copy to clipboard operation
pdftk copied to clipboard

fill_form garbles input text for fields using embedded TrueType font

Open xenyal opened this issue 5 years ago • 0 comments

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: Screen Shot 2019-07-22 at 9 45 56 AM

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. Screen Shot 2019-07-22 at 9 46 02 AM

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

xenyal avatar Jul 22 '19 13:07 xenyal