Prompt

Why is my HTML to PDF output missing fonts?

Technology / Developer Tools1 observationLast seen Oct 12, 2026

Latest observation

Oct 12, 2026OpenAI APIWeb search: off

Fonts usually go missing in HTML-to-PDF output for one of these reasons:

  1. The PDF engine can’t access the font files

    • The font is loaded from a path or URL the converter can’t reach.
    • Relative paths work in the browser but not in the PDF renderer.
    • The renderer may need an absolute file path or embedded base64 font.
  2. The font is not embedded

    • Some tools don’t automatically embed fonts into the PDF.
    • If the viewer doesn’t have that font installed, it will fall back to another font or show blank/missing text.
  3. CSS @font-face is incomplete or incorrect

    • Missing font-family, src, or correct format declarations.
    • Wrong file type for the converter, e.g. WOFF2 unsupported by some engines.
    • Example:
      @font-face {
        font-family: 'MyFont';
        src: url('/fonts/MyFont.ttf') format('truetype');
      }
      
  4. The browser renders it, but the PDF tool uses a different engine

    • Chrome, wkhtmltopdf, Puppeteer, WeasyPrint, Prince, Playwright, etc. all have different font support.
    • A font that works in Chrome might fail in wkhtmltopdf or older headless browsers.
  5. Web fonts are blocked or not fully loaded before PDF generation

    • If the PDF is generated before the font finishes downloading, fallback fonts are used.
    • In browser-based rendering, wait for fonts to load first:
      await document.fonts.ready;
      
  6. Font licensing or subsetting issues

    • Some PDF generators subset fonts or fail with certain font encodings.
    • Rarely, the font itself may be corrupted or unsupported.

Things to check quickly

  • Use absolute URLs for fonts.
  • Make sure the font format is supported by your converter.
  • Confirm the font is loaded before generating the PDF.
  • Try embedding the font with @font-face.
  • If using a tool like wkhtmltopdf, verify it supports the font format and CSS features you need.

If you want, I can help diagnose your specific setup if you share:

  • the HTML/CSS font code,
  • the PDF library/tool,
  • and whether the font works in the browser but not in the PDF.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.