Skip to content

fill_form garbles input text for fields using embedded TrueType font #5

@xenyal

Description

@xenyal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions