Skip to content
Lamina PDF
Unreleased

These docs describe changes that aren’t released yet. For the newest release, see the released docs.

strict

All codes

  • Type: error
  • Kind: input (the input is malformed beyond what tolerance repairs)

What happened

Strict mode refused something the tolerant reader would have repaired.

Why

The file needs repair; see the warning code in the data.

How to fix

Open without strict mode, or fix the file.

Example

let options = OpenOptions::new().with_strict(true);
let err = Document::open_bytes(bytes_with_a_broken_xref, options).unwrap_err();
// { "code": "strict", "data": { "warning": "xref-repaired" }, … }

Data fields

warning (the warning code).