I am trying to generate PDF through python by using reportlab. (beginner level)
Basically, I want to create a table with a checkbox inside.
For example, refer to below code:
...
data =[
[Paragraph("Option 1",style=custom_para), "anything"],
[Paragraph("Option 2",style=custom_para), "anything"]
]
t=Table(data, style=style_table, colWidths=[100, 100])
Story.append(t)
...
I already tested that the above code can generate table correctly.
Now, I want something further, which is something like:
...
data =[
[Paragraph("Option 1",style=custom_para), checkbox_1],
[Paragraph("Option 2",style=custom_para), checkbox_2]
]
t=Table(data, style=style_table, colWidths=[100, 100])
Story.append(t)
...
How should I implement the checkbox_1, checkbox_2?
What is the most efficient way to achieve this?