0

While using pdfrw, I am able to update all of the text fields on the fillable pdf, with no issue. (This is done using the pdfDict class within pdfrw. However, I am not able to check the checkboxes or radio buttons, via any dict value that I have tried

I have tried using a number of values for the corresponding field in the dictionary, including 1, '/1', '/On', '/Yes', and 'n', but none of them have resulted in the checkbox/radiobutton being checked.

key = annotation[Annot_Field_Key][1:-1]
if key in data.keys():
    annotation.update(pdfrw.PdfDict(V = '{}'.format(data[key])))

I also have a dictionary containing keys consisting of the pdf field names, and values of sample values

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
wmoskal
  • 295
  • 1
  • 4
  • 15

1 Answers1

1

Try annotation.update(pdfrw.PdfDict(V = '{}'.format("Yes"))) instead of "\Yes"

rma
  • 1,853
  • 1
  • 22
  • 42