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

[Bug]: content is not visible in some fields. #19083

Closed
karthikchakry opened this issue Nov 21, 2024 · 1 comment · Fixed by #19086
Closed

[Bug]: content is not visible in some fields. #19083

karthikchakry opened this issue Nov 21, 2024 · 1 comment · Fixed by #19086

Comments

@karthikchakry
Copy link

karthikchakry commented Nov 21, 2024

Attach (recommended) or Link to PDF file

TEST_TM DATA ENTRY.pdf

Web browser and its version

chrome, 131.0.6778.71

Operating system and its version

MAC OS, 14.7.1

PDF.js version

4.8.69

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Open the above attached PDF, in page 6, the account number is not visible if the PDF is opened using PDF. But PDF is opened in any other viewer like adobe or chrome, the account name is visible.

What is the expected behavior?

in adobe
The content should be visible in these fields where marked with red box in the screenshot.

What went wrong?

In PDF JS
The content is not visible in these fields where marked with red box in the screenshot.

Link to a viewer

No response

Additional context

No response

@calixteman
Copy link
Contributor

The Choice element has no Opt entry but it has V one.
About Opt:

(Optional) An array of options that shall be presented to the user. Each element
of the array is either a text string representing one of the available options or an
array consisting of two text strings: the option’s export value and the text that
shall be displayed as the name of the option.
If this entry is not present, no choices should be presented to the user.

and V:

The field dictionary’s V (value) entry (see Table 220) identifies the item or items currently selected in the choice
field. If the field does not allow multiple selection—that is, if the MultiSelect flag (PDF 1.4) is not set—or if
multiple selection is supported but only one item is currently selected, V is a text string representing the name
of the selected item, as given in the field dictionary’s Opt array. If multiple items are selected, V is an array of
such strings. (For items represented in the Opt array by a two-element array, the name string is the second of
the two array elements.) The default value of V is null, indicating that no item is currently selected.

In Acrobat, when disabling the readonly mode, the field is displayed as a choice widget (with the arrow on the right) and since it's a mix of a text field and a choice list (something we don't have in pure HTML), the text field value is the V entry.

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

Successfully merging a pull request may close this issue.

3 participants