Matterhorn 31-006 · PDF/UA-1 UA1:7.21.3.3-1

CMap not in Table 118 and not embedded in the PDF

BlockerCheckpoint 31: FontsWCAG 1.3.1 (A)

A predefined CMap must be one of the standard names; anything else must be embedded in the file.

The condition, as the protocol states it. “A CMap is neither listed as described in ISO 32000-1:2008, 9.7.5.2, Table 118 nor is it embedded.”

Matterhorn Protocol 1.1, checkpoint 31, index 31-006, section UA1:7.21.3.3-1. Software can decide this one on its own.

What a screen reader actually does

Without the CMap, character codes cannot be interpreted at all.

What the CMap does that nothing else can

In a composite (Type0) font, the content stream does not hold characters. It holds byte strings, and the font’s /Encoding — a CMap — is what turns them into something:

  1. It says how many bytes make one code. Identity-H reads two bytes at a time. A Shift-JIS CMap such as 90ms-RKSJ-H mixes one-byte and two-byte codes. A UTF-8 CMap reads one to four. Without the CMap, the viewer does not know where one character ends.
  2. It maps each code to a CID, which the descendant font turns into a glyph.

The ToUnicode CMap, which supplies the text a screen reader gets, is keyed by those same codes. So if the codes cannot be found, neither can the text.

Two ways to provide one

A font can name a predefined CMap, which costs nothing because the viewer is expected to have it:

/Encoding /UniJIS-UTF16-H

or embed one as a stream:

/Encoding 14 0 R      % a stream with /Type /CMap, /CMapName, /CIDSystemInfo

“Predefined” has a precise meaning: the 61 names in ISO 32000-1, section 9.7.5.2, Table 118. They fall into five groups — Adobe-GB1 (simplified Chinese: the GB… and UniGB… CMaps), Adobe-CNS1 (traditional Chinese: B5pc, ETen, HKscs, CNS, UniCNS…), Adobe-Japan1 (83pv, 90ms, 90msp, 90pv, Add, EUC, Ext, H, V, UniJIS…), Adobe-Korea1 (KSC…, UniKS…), and the two Identity CMaps.

Condition 31-006 is the third case: a name that is not on the list, and no stream.

How a file ends up there

A real CMap that is not in the standard. Adobe’s CMap resources run well past Table 118. UniJIS-UTF8-H, UniJIS-UTF32-H and UniJIS2004-UTF16-H are all published Adobe-Japan1 CMaps, maintained by Adobe. A producer on a machine that has them can name them, and the file renders on that machine and on any other that has them too. It is not a PDF/UA file, because nothing guarantees the next machine does.

A name that is almost right. PDF names are case-sensitive: /identity-h is not /Identity-H. A forgiving viewer may cope; a strict one has no CMap.

What the reader gets

It depends entirely on the machine. Where the viewer has the CMap, the codes are split correctly, the ToUnicode map applies, and the text reads normally. Where it does not, the viewer has to guess how to split the bytes or give up — and one wrong guess about where a character ends can throw off the characters after it.

How much a wrong split costs is easy to show. The test file for this page has two-byte codes and names UniJIS-UTF8-H, which the Poppler install it was checked on does have. Poppler applied it faithfully and split each two-byte code into two one-byte codes, so pdftotext returned 1 4 2 8 9( 2 0 1 4 ) for text that reads 14289 (2014). That file is artificial — its bytes were written for Identity-H — but it is exactly what happens when the CMap a viewer uses is not the one the bytes were written for. For a screen-reader user the result is spaced-out digits at best, and for Japanese or Chinese text it is wrong characters or silence.

How to check it free

pdffonts (Poppler) prints the CMap name in its encoding column for every composite font:

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
ABCDEF+JPGothic-Regular              CID TrueType      UniJIS-UTF8-H    yes yes yes     11  0

Custom there means the CMap is embedded, which passes. Any other value must be one of the 61 names in Table 118, spelled exactly.

Acrobat Pro. Document Properties (File → Properties, or Menu → Document Properties in the newer interface) → Fonts lists every font with its type and the encoding used to display it, as Adobe documents the tab. For a composite font the encoding is the CMap.

veraPDF with its PDF/UA-1 profile tests it under clause 7.21.3.3.

How to fix it

Acrobat has no command that embeds a CMap or changes which one a font uses. Adobe’s own advice for character-encoding failures is to re-create the PDF, and that is the fix here.

Re-export so the font uses Identity-H with a ToUnicode CMap, or so the producer embeds the CMap it uses.

Or embed the CMap yourself, if you have the exact resource the file names (Adobe publishes them in its cmap-resources repository). That means adding a stream object with /Type /CMap, /CMapName and /CIDSystemInfo and pointing /Encoding at it, which qpdf --json-output and --update-from-json can do. It is low-level work, and if that CMap is itself built on another one with usecmap, the condition moves to 31-008 rather than going away.

What Taggart does

For every Type 0 font that text is set in, Taggart looks at the CMap name. If /Encoding is a stream, the CMap is embedded and passes, whatever it is called. If it is a name, Taggart compares it — exactly, case included — with the 61 names in Table 118, and reports anything else as a blocker:

/ABCDEF+JPGothic-Regular uses the CMap ‘UniJIS-UTF8-H’, which is neither listed in ISO 32000-1 Table 118 nor embedded in the file.

The finding carries the font’s object number and the first page it appears on. There is no fix in Taggart: it carries no CMap resources to embed, and it does not rewrite a font’s encoding. The finding stays a blocker until the file is re-made, and Taggart will not write the PDF/UA identifier while it stands.

How Taggart handles it

Taggart checks for this condition automatically and reports it as a blocker, with where in the file it found it.

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

Which CMaps are allowed without embedding?

The 61 listed in ISO 32000-1 Table 118: Identity-H and Identity-V, and the predefined Chinese, Japanese and Korean CMaps such as UniGB-UTF16-H, 90ms-RKSJ-H or UniKS-UCS2-H. A conforming viewer is expected to know those by name. Any other CMap has to be in the file.

UniJIS-UTF8-H is a real Adobe CMap. Why does it fail?

Because real is not the test; listed is. Adobe publishes many more CMap resources than ISO 32000-1 lists — UTF-8 and UTF-32 variants, the JIS2004 ones — and a viewer may or may not have them. The standard draws the line at Table 118, and anything past it must travel with the document.

Is a typo in the name the same failure?

Yes. PDF names are case-sensitive, so /identity-h is not /Identity-H; it is an unlisted CMap that is not embedded, and a viewer that does not happen to forgive the spelling has no CMap at all.

Does an embedded CMap with a predefined name count as embedded?

Yes. If /Encoding is a stream, the CMap is in the file, whatever its /CMapName says. Whether that embedded CMap in turn leans on an unlisted one through /UseCMap is a separate condition, 31-008.

Where this sits in the standards

Standards this condition maps to
StandardReference
Matterhorn Protocol 1.1Checkpoint 31 (Fonts), index 31-006
PDF/UA-1 (ISO 14289-1)Clause 7.21.3.3-1
WCAG 2.11.3.1 Info and Relationships — Level A
EN 301 549 / Section 508 / ADA Title IIAll 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.

Other conditions in checkpoint 31

Checkpoint 31 covers fonts. These are its other failure conditions; the ones without a link are in the rule set but do not have a written page yet.

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.

Check a PDF free

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 .