CHAPTER 3
108
Syntax
KEY
TYPE
DESCRIPTION
Index
array
(Optional)
An array containing a pair of integers for each subsection in this sec-
tion. The first integer is the first object number in the subsection; the second inte-
ger is the number of entries in the subsection
The array is sorted in ascending order by object number. Subsections cannot over-
lap; an object number may have at most one entry in a section.
Default value:
[0
Size]
.
Prev
integer
(Present only if the file has more than one cross-reference stream; not meaningful in
hybrid-reference files; see “Compatibility with Applications That Do Not Support
The byte offset from the beginning of the file to the begin-
ning of the previous cross-reference stream. This entry has the same function as
the
Prev
entry in the trailer dictionary (Table 3.13). (See also implementation note
(Required)
An array of integers representing the size of the fields in a single cross-
reference entry. Table 3.16 describes the types of entries and their fields. For PDF
1.5,
W
always contains three integers; the value of each integer is the number of
bytes (in the decoded stream) of the corresponding field. For example,
[1 2 1]
means that the fields are one byte, two bytes, and one byte, respectively.
A value of zero for an element in the
W
array indicates that the corresponding field
is not present in the stream, and the default value is used, if there is one. If the first
element is zero, the type field is not present, and it defaults to type 1.
The sum of the items is the total length of each entry; it can be used with the
Index
array to determine the starting position of each subsection.
Note:
Different cross-reference streams in a PDF file may use different values for
W
.
W
array
Cross-Reference Stream Data
Each entry in a cross-reference stream has one or more fields, the first of which
designates the entry’s type (see Table 3.16). In PDF 1.5, only types 0, 1, and 2 are
allowed. Any other value is interpreted as a reference to the null object, thus
permitting new entry types to be defined in the future.
The fields are written in increasing order of field number; the length of each field
is determined by the corresponding value in the
W
entry (see Table 3.15). Fields
requiring more than one byte are stored with the high-order byte first.