Previous Next


                                               944
       CHAPTER 10                                                     Document Interchange



10.8.3 Replacement Text

       Just as alternate descriptions can be provided for images and other items that do
       not translate naturally into text (as described in the preceding section), replace-
       ment text can be specified for content that does translate into text but that is rep-
       resented in a nonstandard way. These nonstandard representations might
       include, for example, glyphs for ligatures or custom characters, or inline graphics
       corresponding to letters in an illuminated manuscript or to dropped capitals.

       Replacement text can be specified for the following items:
       • A structure element (see Section 10.6.1, “Structure Hierarchy”), by means of
         the optional ActualText entry (PDF 1.4) of the structure element dictionary.
       • (PDF 1.5) A marked-content sequence (see Section 10.5, “Marked Content”),
         through an ActualText entry in a property list attached to the marked-content
         sequence with a Span tag.

       The ActualText value is not a description but a replacement for the content, pro-
       viding text that is equivalent to what a reader with sight would see when viewing
       the content. In contrast to the value of Alt, which is considered to be a word or
       phrase substitution, the value of ActualText is considered to be a character substi-
       tution for the structure element or marked-content sequence. Thus, if each of two
       (or more) consecutive structure or marked-content sequences has an ActualText
       entry, they should be treated as if no word break is present between them.

       The following example shows the use of replacement text to indicate the correct
       character content in a case where hyphenation changes the spelling of a word (in
       German, up until recent spelling reforms, the word “Drucker” when hyphenated
       was rendered as “Druk-” and “ker”).

       Example 10.24
          (Dru) Tj
          /Span
             <</Actual Text (c) >>
             BDC
                  (k-) Tj
             EMC
          (ker) '

       Like alternate descriptions (and other text strings), replacement text, if encoded
       in Unicode, may include an escape sequence for indicating the language of the
       text, overriding the prevailing Lang entry (see Section , “Text String Type”).

Previous Next