Text inside a switched-off layer
The document's own catalogue records that a layer is off, and text inside it is never drawn while every extractor reads it perfectly.
How the text is hidden
PDF optional content groups are named layers with a user-facing toggle. The default configuration /D lists the groups that start off in /OFF, or inverts the sense with /BaseState /OFF plus an /ON exception list. Content joins a layer either through a BDC /OC marked-content operator naming an entry in the page's /Properties, or through an XObject's own /OC. Content in an off group is simply not painted.
Why a model still reads it
The text is present in the content stream in the ordinary way; nothing about it is malformed. Only a reader that consults the catalogue knows it is not displayed, and text extractors do not.
What we do about it
hiddenOptionalGroups builds the off set from the /D configuration, honouring /BaseState and subtracting /ON. isHiddenByOptionalContent handles both a direct group reference and an /OCMD membership dictionary — evaluating a /VE visibility expression (/Not, /And, /Or) with precedence over /P, and otherwise applying the AnyOn/AllOn/AnyOff/AllOff policies. While inside such a group the parser returns invisibleReason: 'optional-content-off', checked ahead of every other reason because the file states the intent outright. The rule pdf-optional-content-off fires at high, action flag — never stripped, because a layer is invisible by configuration rather than by definition.
How often it fires
0% of 630 real PDFs — 510 SEC-sourced contracts plus 120 Common Crawl web PDFs (35 producers), measured 2026-08-21.
This is an alert-volume number and nothing else. It says how often the alarm sounds on documents as found — not how often it is right, and not whether what it found was harmless. Documents as found may themselves carry concealment. Read it against the population named above rather than as a property of documents in general.
Check your own file
Three commands: a key, credit, a verdict.
Start with the API