pub struct Linearization {
pub version: f64,
pub file_length: u64,
pub hint_streams: Vec<(u64, u64)>,
pub first_page_object: u32,
pub first_page_end: u64,
pub page_count: u32,
pub main_xref_offset: u64,
pub first_page: u32,
}Expand description
The linearization parameter dictionary (ISO 32000-1 Annex F.3, Table F.1): the first object of a linearized file, whose entries locate the first page and the hint streams so a reader can show the first page before the whole file has arrived.
Fields§
§version: f64/Linearized: the version of the linearized format.
file_length: u64/L: the length of the file the dictionary was written for. When
it differs from the actual length the file is ordinary PDF; see
Linearization::is_current.
hint_streams: Vec<(u64, u64)>/H: the offset and length of the primary hint stream and, when
present, of the overflow hint stream, as written.
first_page_object: u32/O: the object number of the first page’s page object.
first_page_end: u64/E: the offset of the end of the first page.
page_count: u32/N: the number of pages in the document.
main_xref_offset: u64/T: the offset of the main cross-reference table’s first entry
(of the main cross-reference stream in a file that uses streams).
first_page: u32/P: the page number of the first page, 0 when absent.
Implementations§
Source§impl Linearization
impl Linearization
Sourcepub fn is_current(&self, file_length: u64) -> bool
pub fn is_current(&self, file_length: u64) -> bool
Whether /L equals the file’s actual file_length. Table F.1 makes
a mismatch mean the file is not linearized and shall be read as
ordinary PDF, the usual cause being an appended update.
Covers ISO 32000-1 Annex F.3.