fillpdf
fillpdf copied to clipboard
Error on write_fillable_pdf
fillpdfs.write_fillable_pdf('input.pdf', 'new.pdf', data_dict)
File "/opt/homebrew/lib/python3.11/site-packages/fillpdf/fillpdfs.py", line 295, in write_fillable_pdf template_pdf.Root.AcroForm.update(pdfrw.PdfDict(NeedAppearances=pdfrw.PdfObject('true'))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'update'
Not sure where it's going wrong.
Just using a standard tax document
data_dict = {
'f1_1[0]': 'Wakka',
}
fillpdfs.write_fillable_pdf('input.pdf', 'new.pdf', data_dict)
The output from print_form_fields
is something like this:
{'f1_1[0]': 'oouoiuuoi', 'f1_2[0]': 'opuoiuop', 'f1\1373\1330\135': '', 'f1_4[0]': 'Buzz Lightyear', }
What are those unicode escape characters as well?