Graphics Programs Reference
In-Depth Information
After the string is read from the file, and the escaped characters resolved to yield the
series of bytes forming the string proper, it may then be interpreted as described in
“Text Strings” on page 45 .
Hexadecimal strings
Strings can also be written as a sequence of hexadecimal digits between < and > , each
pair representing a byte:
<4F6Eff00> Bytes 0x4F, 0x6E, 0xFF, and 0x00
When there is an odd number of digits, the last is assumed to be 0 . Hexadecimal strings
are typically used to make binary data user-readable. It is functionally the same as
describing strings in the usual way.
Names
Names are used throughout PDF, as keys for dictionaries and to define various multi-
valued objects where using integers to enumerate them would be unintuitive. A name
is introduced with the forward slash. For example:
/French
The / character is part of the name—in fact, / on its own is a valid name. The name
may not contain whitespace or delimiters, but where a name needs to correspond to
some external name which has these characters (for example, spaces), we can use a
hash sign followed by two decimal digits:
/Websafe#20Dark#20Green
This represents the name /Websafe Dark Green since, in ASCII, hexadecimal 20 is the
code for space. Names are case-sensitive ( /French and /french are different).
Boolean Values
PDF allows the boolean values true and false . They are frequently used as flags in
dictionary entries.
Arrays
An array represents an ordered collection of PDF objects, including other arrays. The
objects need not all be of the same type. For example, the array:
[0 0 400 500]
contains four numbers in order: 0 , 0 , 400 , 500 . The array:
[/Green /Blue [/Red /Yellow]]
contains three items: the name /Green , the name /Blue and the array of two names
[/Red /Yellow] .
Search WWH ::




Custom Search