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

radio buttons should have same field names #6623

Closed
si458 opened this issue Nov 11, 2015 · 1 comment
Closed

radio buttons should have same field names #6623

si458 opened this issue Nov 11, 2015 · 1 comment

Comments

@si458
Copy link

si458 commented Nov 11, 2015

Hi,
I have been bashing my head against wall for days now and ive finally found an issue

im using this sample to create online PDF forms for filling in - http://www.codeproject.com/Articles/466362/Blend-PDF-with-HTML (i have updated the pdf.js engine to latest version, tweaked a few files and seemed ok)

however when I create a pdf with radio buttons using adobe and make sure the radio buttons are in the same group, it appears the radio buttons are showing the fieldName as
Group10 Group11
(noticed the extra bit after the Group1)

however they need to be displayed the same fieldName for the radio buttons to work correctly

ive managed to find the line in Annotation.js(535) and pdf.worker.js(5416) - fieldName.unshift('`' + j);

this resolves the issue with text fields, buttons, etc, but not radio buttons!

is it possible to check if type if a radio button if so then dont add it ?

EDIT: simple code i made and seems ok - if (data.fieldFlags & 32768) { }else{ fieldName.unshift('`' + j); }

currently ive just commented out the line and it works

Simon

@yurydelendik
Copy link
Contributor

AcroForms are not supported yet (see #1459 and #6172). If you think that make sense, please submit a pull request. Notice there is a comment about this line https://github.com/mozilla/pdf.js/blob/master/src/core/annotation.js#L522 . My question is: why there is no name for the radio button?

timvandermeij added a commit to timvandermeij/pdf.js that referenced this issue Nov 1, 2016
The original code is difficult to read and, more importantly, performs
actions that are not described in the specification. It replaces empty
names with a backtick and an index, but this behavior is not described
in the specification. While the specification is not entirely clear
about what should happen in this case, it does specify that the `T`
field is optional and that multiple field dictionaries may have the same
fully qualified name, so to achieve this it makes the most sense to
ignore missing `T` fields during construction of the field name. This is
the most specification-compliant solution and, judging by opened issue mozilla#6623, also the required and expected behavior.
timvandermeij added a commit to timvandermeij/pdf.js that referenced this issue Nov 2, 2016
The original code is difficult to read and, more importantly, performs
actions that are not described in the specification. It replaces empty
names with a backtick and an index, but this behavior is not described
in the specification. While the specification is not entirely clear
about what should happen in this case, it does specify that the `T`
field is optional and that multiple field dictionaries may have the same
fully qualified name, so to achieve this it makes the most sense to
ignore missing `T` fields during construction of the field name. This is
the most specification-compliant solution and, judging by opened issue mozilla#6623, also the required and expected behavior.
movsb pushed a commit to movsb/pdf.js that referenced this issue Jul 14, 2018
The original code is difficult to read and, more importantly, performs
actions that are not described in the specification. It replaces empty
names with a backtick and an index, but this behavior is not described
in the specification. While the specification is not entirely clear
about what should happen in this case, it does specify that the `T`
field is optional and that multiple field dictionaries may have the same
fully qualified name, so to achieve this it makes the most sense to
ignore missing `T` fields during construction of the field name. This is
the most specification-compliant solution and, judging by opened issue mozilla#6623, also the required and expected behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants