You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A <select> with a selected option, rendered with useActiveForms, shows its first option in poppler rather than the selected one. mPDF writes the field correctly as far as I can tell: /Opt holds export-and-label pairs and /V and /DV hold the export value of the selected option. What needs settling is whether /V should hold the export value or the label, since poppler evidently matches it against the label, and what Acrobat and Chrome show.
Found while building the forms snapshot document for #38, which renders a select in each of its two blocks; the rasters show "First option" although the second is marked selected. Same on gravitypdf.
The field object carries /Opt [ [(1) (First option)] [(2) (Second option)] ] /V (2) /DV (2). pdftoppm renders "First option" in the box.
Where to look
ISO 32000-1 §12.7.4.4 on choice fields, for whether /V is the export value or the display string when /Opt uses pairs.
Form::_putform_ch() writes /V from the option's value attribute.
Acrobat and Chrome, for what they display for the same file; if both show the selected option, this is a poppler difference and the issue can be closed with a note.
Test plan
A unit case on the emitted document asserting /V for a selected option, in whichever form the spec settles on, and one for a select with no selected option.
The forms snapshot document from Make page-break-inside: avoid dependable #38 re-rendered; its two selects should read "Second option, selected" in the raster if the fix reaches poppler's matching.
Summary
A
<select>with aselectedoption, rendered withuseActiveForms, shows its first option in poppler rather than the selected one. mPDF writes the field correctly as far as I can tell:/Optholds export-and-label pairs and/Vand/DVhold the export value of the selected option. What needs settling is whether/Vshould hold the export value or the label, since poppler evidently matches it against the label, and what Acrobat and Chrome show.Found while building the forms snapshot document for #38, which renders a select in each of its two blocks; the rasters show "First option" although the second is marked selected. Same on
gravitypdf.Try it
The field object carries
/Opt [ [(1) (First option)] [(2) (Second option)] ] /V (2) /DV (2).pdftoppmrenders "First option" in the box.Where to look
/Vis the export value or the display string when/Optuses pairs.Form::_putform_ch()writes/Vfrom the option'svalueattribute.Test plan
/Vfor aselectedoption, in whichever form the spec settles on, and one for a select with noselectedoption.