Skip to content

Choice field appearances clip the last list row and draw a combo box without an arrow #426

Closed

Description

@jakejackson1

On #387 (fix/348-pdfa-active-forms), two problems in the appearance streams mPDF now draws for choice fields. They matter wherever a viewer draws from /AP, which after #387 is every viewer for Latin-only forms, since /NeedAppearances is no longer written.

  1. The last row of a list box is clipped. A <select size="3"> cuts off the descenders of its last visible option ("Cherry" in the test) at the box's lower edge. A one-row list box can also show the top of the next option. The row height and the clip rectangle disagree.
  2. A combo box has no drop-down arrow. A combo box's appearance is a plain box with the selected text, so it can't be told from a text field. Viewers that use their own widget add an arrow when the field is active, but the printed or flattened page shows none. mPDF's static select already draws an arrow (src/Form.php, the sans arrow under PDF/A); the appearance could use the same one.

Found while checking #419 (#396) against #387's appearances with pdftoppm and Ghostscript at 200 DPI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfork-only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions