Matterhorn 20-003 · PDF/UA-1 UA1:7.10-2
Layers that switch themselves: the /AS entry
Automatic state (usage application) entries let content appear or disappear based on zoom or print state, which can hide content from a reader unpredictably. PDF/UA-1 forbids them.
The condition, as the protocol states it. “An AS entry appears in an Optional Content Configuration Dictionary.”
Matterhorn Protocol 1.1, checkpoint 20, index 20-003, section UA1:7.10-2. Software can decide this one on its own.
What a screen reader actually does
Content may be present or absent depending on viewer state, so the reading experience is not deterministic.
What /AS does
A layer, an optional content group, can carry a /Usage dictionary describing when it is meant to be seen: only in print, only on screen, only between two zoom levels, only for readers of one language. On its own that description does nothing. The instruction to act on it is /AS, an entry in a layer configuration (the default /D, or one of the alternates in /Configs).
/AS is an array of usage application dictionaries. Each names an event (/View, /Print or /Export), a set of layers, and the usage categories to consult when that event happens. A print-only watermark looks like this:
12 0 obj % the layer
<< /Type /OCG /Name (DRAFT watermark)
/Usage << /View << /ViewState /OFF >>
/Print << /PrintState /ON >> >> >>
endobj
/D << /Name (Default) % in /OCProperties
/ON [ 12 0 R ]
/AS [ << /Event /View /OCGs [ 12 0 R ] /Category [ /View ] >>
<< /Event /Print /OCGs [ 12 0 R ] /Category [ /Print ] >> ] >>
The layer is on by default. On screen the viewer consults /View and switches it off; when printing it consults /Print and switches it on. The same mechanism with the /Zoom category gives labels that appear only past a magnification, and with /Language gives text that appears only for one language setting.
The condition is an /AS key in any configuration dictionary, default or alternate. PDF/UA-1 clause 7.10 forbids it outright.
Why it is forbidden
Because what the document contains stops being a property of the document. It becomes a property of the viewing session: how far the reader has zoomed, whether they are printing, which language their viewer is set to, and which preferences it honours. Adobe’s own page notes that Acrobat applies these layer settings only when a document preference, Allow layer state to be set by user information, is selected (Edit layer properties). So even the switching is up to the reader’s settings.
For a screen-reader user that means content which is there or not there depending on conditions they cannot see and did not choose. A sighted colleague at 400% sees labels that are not present at 100%; a printed copy says DRAFT and the screen does not. Two people can review the same file and disagree about what it says, and both be right.
Where it comes from
Acrobat’s Layer Properties dialog is the familiar way to produce it. Its Visibility, Print and Export settings let a layer behave differently from its plain on or off state, and Adobe’s documented example is the watermark above: Default State On, Visibility Never Visible, Print Always Prints, Export Always Exports. In the file, behaviour like that is a /Usage dictionary on the layer with an /AS entry to apply it.
The format was also built for drawings and maps with zoom-dependent detail, and for multilingual documents that switch text by language. Any producer that wants those features to switch by themselves has to write /AS.
How to check it free
qpdf. Write the readable form, open it in a text editor and search inside /OCProperties for /AS:
qpdf --qdf --object-streams=disable report.pdf readable.pdf
Do not search the whole file and stop at the first hit: every checkbox and radio button in a form has an /AS of its own, which is unrelated and allowed.
Acrobat Pro. In the Layers panel, select a layer → Options → Layer Properties, and read its Visibility, Print and Export settings. A layer that never shows, always prints, or behaves differently on paper is one that depends on usage switching.
veraPDF, validating against PDF/UA-1, reports it under clause 7.10.
How to fix it free
First decide what each switching layer should do in the published file, because the fix is that decision. A DRAFT watermark that matters should be visible to everyone. Zoom-dependent labels should either be on or be gone.
Flatten, if the published copy does not need layers. Set the layers the way the reader should get them, then Layers panel → Options → Flatten Layers. Adobe says this removes all layer structure and permanently discards hidden content, and cannot be undone (Merge and flatten layers). The /AS goes with everything else.
Delete the key by hand. In the readable qpdf file, remove /AS [ … ] from the configuration, then repair the offsets and write a normal file:
fix-qdf readable.pdf > edited.pdf
qpdf edited.pdf report-fixed.pdf
Reset it in Acrobat, with care. Adobe documents the Layer Properties settings that produce this behaviour, but not what Acrobat writes when you set them back, so check the result with qpdf or veraPDF rather than assuming the key is gone.
What Taggart does
The check reads the default configuration and every entry in /Configs, and reports each one that contains /AS:
Optional content configuration D contains an /AS (usage application) entry, which PDF/UA-1 forbids because it lets content appear and disappear based on viewer state.
The repair is optional-content-names, the same one that names configurations for 20-001 and 20-002. It is marked safe, so Fix All Safe applies it. It deletes the /AS key from each configuration and logs it (removed the /AS usage application entry from D). It does not touch the layers: their /Usage dictionaries stay, and so do the configuration’s on and off lists.
What that changes is worth a look before you ship. After the repair, every viewer starts each layer in its default state, on screen and on paper alike. In the watermark example the layer is on by default, so a viewer that used to hide it on screen will now show it. Taggart does not decide whether that watermark belongs in the published file; open the Layers panel on the repaired copy and settle it there.
How Taggart handles it
Taggart checks for this condition automatically and reports it as a blocker, with where in the file it found it.
The fix is Name optional content configurations. It is mechanical, so “Fix All Safe” applies it along with the others in one pass and lists what it changed. Your original file is never modified.
Whatever Taggart changes, the page still looks identical. Fixes edit the PDF object model, not the content streams, and every remediation is re-rendered and compared against the original at structural similarity ≥ 0.999 before you get the file back. A tool that quietly reflows your document is worse than no tool.
Frequently asked questions
Is this the /AS on checkboxes and radio buttons?
No. Widget annotations use a key with the same name for their appearance state — which picture of the checkbox to draw — and that one is fine. Only /AS inside an optional content configuration dictionary is forbidden. Search a whole file for /AS and you will find both.
Can an accessible PDF keep a print-only watermark?
Not one that hides itself on screen through /AS. If the watermark tells the reader something (DRAFT, COPY, NOT FOR CIRCULATION), it should be on the page for every reader, sighted or not. If it tells them nothing, it belongs to the print run, not the published file.
Does Taggart remove the layer's usage settings as well?
No. It removes /AS from each configuration and leaves each layer's /Usage dictionary where it is. Usage on its own is descriptive; without /AS, nothing tells a viewer to act on it.
Will the page look different after the repair?
In a viewer that was applying the /AS, it can. Every layer now shows in its default on or off state, on screen and on paper alike. A layer that was on by default and kept off the screen by its usage settings will now be on the screen.
Where this sits in the standards
| Standard | Reference |
|---|---|
| Matterhorn Protocol 1.1 | Checkpoint 20 (Optional Content), index 20-003 |
| PDF/UA-1 (ISO 14289-1) | Clause 7.10-2 |
| WCAG 2.1 | 1.3.1 Info and Relationships — Level A |
| EN 301 549 / Section 508 / ADA Title II | All three point at WCAG 2.1 Level AA for non-web documents, so a Level A or AA criterion here is in scope for each of them. |
Related conditions
- 20-001 Name missing or empty in an Optional Content Configuration Dictionary in ConfigsOptional content (layer) configurations must be nameable so a user can identify and toggle them.
- 20-002 Name missing or empty in the default Optional Content Configuration DictionaryThe default optional-content configuration has no name.
Other conditions in checkpoint 20
Checkpoint 20 covers optional content. These are its other failure conditions; the ones without a link are in the rule set but do not have a written page yet.
- 20-001 Name missing or empty in an Optional Content Configuration Dictionary in ConfigsOptional content (layer) configurations must be nameable so a user can identify and toggle them.
- 20-002 Name missing or empty in the default Optional Content Configuration DictionaryThe default optional-content configuration has no name.
Check your own file. Taggart’s validator is free and unlimited — 75 of the 87 Matterhorn conditions software can decide, with the other 12 listed for you to confirm; no watermark, no expiry, and no account needed up to 60 pages.
Checked with Taggart on a generated file that fails this condition on . The Acrobat steps follow Adobe’s documentation and were not walked through by hand. Last updated .