Previous Next
908
CHAPTER 10 Document Interchange
As an example, consider the following fragment of HTML code, which produces
a line of text containing a hypertext link:
< html >
< body >
<p>
Here is some text < a href = http : / / www . adobe . com >with a link< /a > inside .
< /body >
< /html >
Example 10.17 shows an equivalent fragment of PDF using a link element, whose
text it displays in blue and underlined. Example 10.18 shows an excerpt from the
associated logical structure hierarchy.
Example 10.17
/P << /MCID 0 >> % Marked-content sequence 0 (paragraph)
BDC % Begin marked-content sequence
BT % Begin text object
/T1_0 1 Tf % Set text font and size
14 0 0 14 10.000 753.976 Tm % Set text matrix
0.0 0.0 0.0 rg % Set nonstroking color to black
( Here is some text ) Tj % Show text preceding link
ET % End text object
EMC % End marked-content sequence
/Link << /MCID 1 >> % Marked-content sequence 1 (link)
BDC % Begin marked-content sequence
0.7 w % Set line width
[] 0 d % Solid dash pattern
111.094 751.8587 m % Move to beginning of underline
174.486 751.8587 l % Draw underline
0.0 0.0 1.0 RG % Set stroking color to blue
S % Stroke underline
BT % Begin text object
14 0 0 14 111.094 753.976 Tm % Set text matrix
0.0 0.0 1.0 rg % Set nonstroking color to blue
( with a link ) Tj % Show text of link
ET % End text object
EMC % End marked-content sequence
Previous Next