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
Checkboxes are "checked" when pressing only one of them #121
Comments
Hi, I think your problem is related to a similar issue (recently solved). That means the checkboxes get a reference to the same appearance dictionary, which is probably why you get this rendering issue. The related issue was similar behaviour with a TextField. Can you create a small, minimal example (two checkboxes on a page)? |
Thank you very much for your reply!, Kind Regards, Roger
|
Can you verify whether this PDF displays the expected behaviour? Kind regards, |
Hi, I opened the pdf, and still both checkboxes are checked at the same time when I just click on one of them. |
Personally to me that code looks wrong. You are just adding doing:
I would think you need to add at least a qualifier to what the field name is for the checkbox. Otherwise the code treats the name as 'None' and since they all have the same name, they all behave the same way. The code to me is:
In other PDF tools you always associate a name with a field so it can be treated separately. And that code is not associating different names to fields (like with some GUID) if you do not enter a name. Something like (untested): table.add(Paragraph("Yes?")) |
If you do not enter a name, I think the problem is something a bit deeper. You see, Although the PDF spec does not forbid it, this seems to be a problem for some PDF reader software. I remember a similar bug with a I then added the option to tell the IO module that an object (regardless of its similarity) should be treated as being unique. I guess (hope) this bug will be something similar. That being said, I am going to rework some of the Kind regards, |
Well I could be wrong,I looked at that code too. It seems to generate a name that would be the same for everything on a page. The names must be unique. |
I added a test to verify that 2 checkboxes do in fact get unique names. |
I add a series of checkboxes within the cells of table.
The problem is: When I checked one, all of them got checked. Is there a way to make them independent to each other?
I expected one checkbox activated at the time I clicked on it.
The text was updated successfully, but these errors were encountered: