Skip to main content

MAX_OBJECTS

Constant MAX_OBJECTS 

Source
pub const MAX_OBJECTS: usize = 500_000;
Expand description

Maximum number of xref entries (indirect objects) allowed in a single PDF.

PDFs exceeding this limit are rejected with LoadPdfError::TooLarge to prevent unbounded memory growth. Corpus data shows legitimate documents rarely exceed 50 K objects; 500 K is a safe, generous upper bound. (#497)