Expand description
Resource limits for PDF processing.
These limits protect against adversarial inputs that could cause OOM, stack overflow, CPU exhaustion, or zip bombs. All limits are enforced with clean error returns — no panics.
§Default limits
The defaults cover 99.9% of real-world PDFs while providing strong safety guarantees:
| Resource | Default |
|---|---|
| PDF file size | 500 MB |
| Single decompressed stream | 256 MB |
| Total memory per document | 1 GB |
| Object reference depth | 100 levels |
| Content stream operators | 10,000,000 |
| Image pixel count | 256 megapixels (16384×16384) |
| XFA template nesting depth | 50 levels |
| FormCalc recursion depth | 200 levels |
Structs§
- Processing
Limits - Resource limits for a single PDF processing operation.
Enums§
- Limit
Error - Error returned when a configured resource limit is exceeded.