Skip to main content

parse_xref_table

Function parse_xref_table 

Source
pub fn parse_xref_table(
    source: &[u8],
    offset: u64,
) -> Result<(XrefSection, u64), PdfError>
Expand description

Parse a traditional cross-reference table starting at offset.

The table begins with the xref keyword followed by one or more subsections. Each subsection has a header start_id count and then count entries of exactly 20 bytes each (nnnnnnnnnn ggggg n \r\n or nnnnnnnnnn ggggg f \r\n).

Returns the parsed XrefSection and the byte offset after the table (positioned just before the trailer keyword).