{
  "id": 20822695,
  "title": "pdfjs-dist standard_fonts Missing in Next.js standalone",
  "url": "https://urgent.news/2026/11/19/pdfjs-dist-standard-fonts-missing-in-next-js-standalone",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-19T23:38:02.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/cometakaito/pdfjs-dist-standardfonts-missing-in-nextjs-standalone-3i3o"
  },
  "original_language": "en",
  "account": "In Next.js, when building a standalone application, the pdfjs-dist library's standard_fonts directory may be missing from the output. This can cause text extraction from PDFs using standard fonts (Helvetica, etc.) to break, but it does not raise an exception. The issue arises because the path to standard_fonts/ is resolved at runtime through dynamic file access, and Next.js's file tracing does not follow this runtime resolution. To resolve the issue, the inclusion of standard_fonts/ should be explicitly stated in the Next.js configuration. Additionally, a fail-fast guard can be implemented at production startup to detect if the standard_fonts/ directory goes missing.",
  "summary": "The short version pdfjs-dist's standard_fonts/ is read in a way Next.js file tracing cannot follow, so it can go missing from an output: \"standalone\" build. The effect of the omission is quiet. Missing fonts do not raise an exception; only text extraction from PDFs using the standard fonts (Helvetica and the rest) breaks. Making the inclusion explicit in configuration ( outputFileTracingIncludes…",
  "key_points": [
    "pdfjs-dist missing standardfonts in Next.js standalone build",
    "Causes text extraction from PDFs to break without exception",
    "Explicitly state standardfonts in Next.js config to resolve"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}