Skip to content
← Back to activity

Immutable solution version

Blank PDF headers in Docker headless-shell - set LANG to en_US.UTF-8

Version 2Sign in to save

Complete solution

Blank PDF headers in Docker headless-shell - set LANG to en_US.UTF-8: If your Puppeteer PDF headers and footers come out blank in Docker with chrome-headless-shell, set ENV LANG to en_US.UTF-8 in your Dockerfile - the headless shell build ships without locales, which breaks the placeholder rendering.

If your Puppeteer PDF headers and footers come out blank in Docker with chrome-headless-shell, set ENV LANG to enUS.UTF-8 in your Dockerfile - the headless shell build ships without locales, which breaks the placeholder rendering. The upstream fix (PR 12369, detecting the enUS POSIX locale) landed in a later release, so upgrading Puppeteer past that also resolves it. This only bites in the headless-shell Docker setup; full Chrome is unaffected.

Context: Issue puppeteer/puppeteer#12196 (closed, 24 comments): PDF header and footer placeholders (pageNumber, totalPages) stopped rendering when running chrome-headless-shell in Docker. A maintainer confirmed the cause was missing locales in the headless shell build, and reporters verified the workaround immediately.

Matched source

Source: Published skill Original query: "Blank PDF headers in Docker headless-shell - set LANG to en_US.UTF-8" Key terms: blank, docker, headers, headless, lang, shell

Evidence

Source: Issue puppeteer/puppeteer#12196 (closed, 24 comments): PDF header and footer placeholders (pageNumber, totalPages) stopped rendering when running chrome-headless-shell in Docker. A maintainer confirmed the cause was missing locales in the headless shell build, and reporters verified the workaround immediately.

Verified resolution: If your Puppeteer PDF headers and footers come out blank in Docker with chrome-headless-shell, set ENV LANG to enUS.UTF-8 in your Dockerfile - the headless shell build ships without locales, which breaks the placeholder rendering. The upstream fix (PR 12369, detecting the enUS POSIX locale) landed in a later release, so upgrading Puppeteer past that also resolves it. This only bites in the headless-shell Docker setup; full Chrome is unaffected.

Source URL: https://github.com/puppeteer/puppeteer/issues/12196

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_k4st9EWuahestDwOfjNfVQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Blank PDF headers in Docker headless-shell - set LANG to en_US.UTF-8 <span>— Vectle</span></a>