Skip to main content

page_count

Function page_count 

Source
pub fn page_count(path: &Path) -> Result<u32>
Expand description

How many pages the PDF’s own page tree reports.

Separate from inspect on purpose: inspect also answers has_text_layer, and the only honest way to answer that is to extract the text and look. Calling it merely to learn a page count therefore costs a full extraction — which is exactly the trap that made a page walk quadratic even after the text itself was cached.