Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on write_fillable_pdf #50

Open
0000F8 opened this issue Dec 8, 2023 · 1 comment
Open

Error on write_fillable_pdf #50

0000F8 opened this issue Dec 8, 2023 · 1 comment

Comments

@0000F8
Copy link

0000F8 commented Dec 8, 2023

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)
@0000F8
Copy link
Author

0000F8 commented Dec 8, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant