Skip to content

Inline images and form widgets are out of reading order in PDF/UA tagging #406

Description

@jakejackson1

On #325 (feature/pdfua-1-support), three reading-order problems with inline objects remained after #389. veraPDF flags none of them.

  1. Nested marked content. An inline image's Figure MCID is opened inside its paragraph's MCID. ISO 32000-1 allows nesting only where the outer sequence has no MCID of its own. The paragraph's marked content should be closed around the image.
  2. Objects come after the line's text. mPDF draws inline objects (images and form widgets) at the end of each line, so in content order the Figure or Form comes after the line's text. <label><input type="checkbox"> Check</label> reads as "Check, checkbox".
  3. <a href><img alt="…"></a> puts the Figure beside the Link rather than inside it, so the Link's only content is its annotation (OBJR).

Items 1 and 2 have the same cause: objects in a line are drawn in a second pass. A fix probably records each object's position in the line's content order and emits its marked content in sequence.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions