pub struct XRefStream {
pub dict: PdfDictionary,
pub data: Vec<u8>,
pub widths: Vec<usize>,
pub index: Vec<(u32, u32)>,
}Expand description
Cross-reference stream parser
Fields§
§dict: PdfDictionaryStream dictionary
data: Vec<u8>Decoded stream data
widths: Vec<usize>Field widths from W array
index: Vec<(u32, u32)>Index array (pairs of [first_object_number, count])
Implementations§
Source§impl XRefStream
impl XRefStream
Sourcepub fn parse<R: Read + Seek>(
_reader: &mut R,
stream_dict: PdfDictionary,
stream_data: Vec<u8>,
_options: &ParseOptions,
) -> ParseResult<Self>
pub fn parse<R: Read + Seek>( _reader: &mut R, stream_dict: PdfDictionary, stream_data: Vec<u8>, _options: &ParseOptions, ) -> ParseResult<Self>
Parse a cross-reference stream
Sourcepub fn to_xref_entries(&self) -> ParseResult<Vec<(u32, XRefEntry)>>
pub fn to_xref_entries(&self) -> ParseResult<Vec<(u32, XRefEntry)>>
Convert the cross-reference stream to XRefTable entries
Sourcepub fn trailer_dict(&self) -> &PdfDictionary
pub fn trailer_dict(&self) -> &PdfDictionary
Get the trailer dictionary from the xref stream
Sourcepub fn get_xref_stm_offset(&self) -> Option<u64>
pub fn get_xref_stm_offset(&self) -> Option<u64>
Get the offset to additional xref stream (for hybrid files)
Sourcepub fn get_prev_offset(&self) -> Option<u64>
pub fn get_prev_offset(&self) -> Option<u64>
Get the previous xref offset
Auto Trait Implementations§
impl Freeze for XRefStream
impl RefUnwindSafe for XRefStream
impl Send for XRefStream
impl Sync for XRefStream
impl Unpin for XRefStream
impl UnwindSafe for XRefStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more