Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Unicode characters are missing, replaced by boxes, or stripped from a wkhtmltopdf PDF, check two separate things: whether the input is decoded as UTF-8 and whether the machine generating the PDF has a font containing those characters. Then test CSS fallback and headers or footers independently. Adding --encoding utf-8 alone does not guarantee a fix.

Why Unicode characters go missing in wkhtmltopdf

Unicode failures usually occur at one of three layers: input decoding, glyph availability, or the renderer’s font fallback and runtime environment. These layers can produce similar symptoms, so change one at a time.

  • Encoding problem: the HTML bytes are not UTF-8, or the document’s encoding is absent or inconsistent. The renderer may interpret the bytes incorrectly.
  • Missing glyph: the selected font does not contain the character, and a suitable fallback font is not available to wkhtmltopdf.
  • Runtime or fallback difference: the production host, container, package build, or CSS font selection differs from the developer’s browser environment.

Boxes or blank spaces in place of Chinese, Japanese, Greek, Georgian, or other script characters often point to glyph coverage or fallback, but verify encoding too. ASCII rendering correctly is a useful clue, not a diagnosis by itself.

Start with a minimal UTF-8 reproduction

Make a small file containing the exact failing characters and a few known-good ASCII characters. Save the file as UTF-8, keep the CSS font declaration used in production, and run the same wkhtmltopdf binary and command as the failing job.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
  • EDIT text, images & designs in PDF documents. ORGANIZE PDFs. Convert PDFs to Word, Excel & ePub.
  • READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.
  • CREATE, COMBINE, SCAN and COMPRESS PDFs
  • FILL forms & Digitally Sign PDFs. PROTECT and Encrypt PDFs
  • LIFETIME License for 1 Windows PC or Laptop. 5GB MobiDrive Cloud Storage Included.
<!doctype html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <title>Unicode test</title>
</head>
<body>ASCII — 中文 — 日本語 — Ελληνικά — ქართული</body>
</html>

For example, save this as unicode-test.html and render it with your production command, or start with:

wkhtmltopdf unicode-test.html unicode-test.pdf

A Debian report involving wkhtmltopdf 0.12.5 found that an explicit UTF-8 declaration in the HTML was needed even though the locale and --encoding option were set. That report is a useful diagnostic clue, not proof that the same cause applies to every installation: wkhtmltopdf issue #3108.

Verify the complete input encoding path

An encoding option cannot correct bytes that were already saved or transformed incorrectly. Confirm the file or generated template really is UTF-8, check that any HTTP response and the HTML declaration agree, and look for a conversion step that changes the content before wkhtmltopdf reads it.

Rank #2
Sale
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
  • Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.
  • Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
  • Read & Annotate. Enjoy intuitive reading modes and powerful tools to comment, highlight, and mark up PDFs.
  • Create & Manage PDFs. Create new PDFs, combine multiple files, scan documents, and compress for easy sharing.
  • Fill & Sign Forms. Complete forms and digitally sign documents with secure e-signature tools.
  1. Inspect the source file or template encoding in the editor or generation pipeline; save the reproduction as UTF-8.
  2. Include <meta charset="utf-8"> in the HTML document.
  3. If input handling requires it, pass the option as --encoding utf-8, but retain the correct bytes and HTML declaration.
  4. Compare the PDF from that minimal file with the production output before changing fonts or locale settings.

One Ubuntu issue specifically reports that --encoding utf-8 did not resolve the problem by itself: wkhtmltopdf issue #3233. Locale settings can matter to a broader runtime, but neither a locale nor the command-line flag supplies missing glyphs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check fonts on the PDF-generating host

A browser preview on your laptop is not a reliable test of fonts installed on a Linux server or container. wkhtmltopdf uses the fonts and font configuration visible to the process that creates the PDF. The project documentation notes runtime dependencies on fontconfig and freetype2: wkhtmltopdf downloads and runtime notes.

  1. Identify the exact machine or container image that runs the PDF job, and run font checks there rather than only on a workstation.
  2. Check that the required font files are installed and accessible to the same user and process as wkhtmltopdf.
  3. Select a font with coverage for the missing script. A font that renders Latin letters may not include CJK, Greek, Georgian, Thaana, or emoji characters.
  4. Rebuild or restart the relevant deployment if its image or font installation changed, then rerun the same minimal reproduction.

Issue reports describe Georgian and Greek rendering problems resolved after installing missing system fonts on CentOS, and a Chinese case on Ubuntu involving fonts-wqy-zenhei: issue #4456 and issue #3108. These are examples tied to particular environments, not universal package recommendations. Check the package name, availability, and coverage for your target distribution and language instead of copying a command blindly.

Rank #3
Adobe Acrobat Pro | PDF Software | Convert, Edit, E-Sign, Protect | PC/Mac Online Code | Activation Required
  • Create and edit PDFs. Collaborate with ease. E-sign documents and collect signatures. Get everything done in one app, wherever you go.
  • Edit text and images without jumping to another app.
  • E-sign documents or request e-signatures on any device. Recipients don’t need to log in to e-sign.
  • Convert PDFs to editable Microsoft Word, Excel, or PowerPoint documents.
  • Share PDFs for collaboration. Commenting features make it easy for reviewers to comment, mark up, and annotate.

Installing a font and refreshing fontconfig are not conclusive tests. A Thaana issue reports black square glyphs despite an installed font and refreshed cache: wkhtmltopdf issue #3311. If the expected characters still fail, keep investigating font selection, shaping, and renderer behavior.

Make CSS font fallback easier to diagnose

Check whether your CSS explicitly selects a custom font and whether that file covers every script in the document. A custom typeface can render Latin text correctly while lacking Japanese or other glyphs. Try a known installed font with the needed coverage, then add an explicit fallback family appropriate to the host.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
body {
  font-family: "Your Main Font", "Known Script-Covering Font", sans-serif;
}

Replace the example names with fonts actually installed and verified on the renderer host. Do not assume Chrome’s or Firefox’s fallback choice will match wkhtmltopdf’s. A Windows report describes browsers finding fonts with the needed glyphs where wkhtmltopdf did not, and another issue reports difficulties with fallback from a custom font lacking Japanese characters: issue #4456 and issue #2573.

Rank #4
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
  • Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.
  • EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
  • READ and Comment on PDFs – Intuitive reading modes & document commenting and mark up tools!
  • CREATE, COMBINE, SCAN and COMPRESS PDFs.
  • FILL forms & Digitally Sign PDFs. Work with Digital certificates

For a reproduction, simplify complicated @font-face declarations and test direct family selection first. An older issue reports unexpected unicode-range behavior in an @font-face setup; it does not establish that every version fails, but it is a reason to remove range-based rules while isolating a problem: wkhtmltopdf issue #1837.

Diagnose headers and footers separately

If body text renders but a header or footer loses non-ASCII characters, isolate that region. Header and footer values may travel through a wrapper or command-line arguments rather than the same path as the HTML body. Inspect the value immediately before the wkhtmltopdf process receives it to find whether it was lost in application code or during rendering.

A Rails-wrapper issue reports UTF-8 characters being skipped when passed through command-line values, but the exact cause depends on the calling code: wkhtmltopdf issue #4228.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
PDF Pro 3 - PDF editor to create, edit, convert and merge PDFs - 100% Compatible with Adobe Acrobat - for Windows 11, 10, 8.1, 7
  • ALL-IN-ONE SOLUTION – read, edit, convert, merge and protect your PDF files
  • MAXIMUM FUNCIONALITY – create interactive forms, compare PDFs, bates numbering, find and replace text or colors, convert documents, OCR engine, comment, highlight, fill out and print forms, document protection and others
  • EASY TO INSTALL AND USE – well-structured user-interface, in-program instructions, free tech support whenever you need it
  • GREAT VALUE FOR MONEY - why spend a fortune if you can have maximum functionality at a reasonable price - this also fits the requirements of companies very well
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check the actual wkhtmltopdf build and operating system

Record the full version/build string, operating system or container image, and the exact binary path used by the production job. Different builds and distributions can have different dependencies. The project download notes say distribution-specific packages may align dependencies with the distribution more reliably than a generic binary; compare builds in the target environment rather than assuming one package is interchangeable with another: official downloads page.

A browser test is still useful for comparison: if the same HTML works in Chrome but not in the PDF, that establishes a renderer/environment difference to investigate, not that the HTML or fonts are necessarily sound in wkhtmltopdf. Preserve the browser result alongside the exact wkhtmltopdf command and output.

Troubleshoot by symptom

Symptom Likely area to check Next diagnostic step
Every non-ASCII character is garbled or missing Input bytes, document charset, or conversion before rendering Render the UTF-8 minimal file with an explicit meta declaration and verify the actual source bytes.
ASCII works, but one script appears as boxes Font glyph coverage or fallback on the rendering host Test a font known to cover that script and verify it is available to the renderer process.
Chrome renders it; wkhtmltopdf does not Different installed fonts, fallback behavior, or runtime build Compare host fonts and wkhtmltopdf build; do not treat browser success as proof of renderer parity.
Body is correct; header or footer is not Separate command-line or wrapper argument path Inspect the exact header/footer string immediately before invocation and make a minimal test for that region.
Font is installed and cache refreshed, but glyphs remain wrong Selection, shaping, or engine-specific behavior Reduce CSS and HTML further, confirm the font truly covers the characters, and capture a reproducible case.
Only production or a container fails Different image, user permissions, package, or runtime dependencies Run the reproduction inside the same image and as the same user as the production job.

Prepare a useful issue report

If you need help from a team maintaining your wrapper or deployment, provide a small reproduction rather than a full application. The wkhtmltopdf support page asks for the version, a detailed description, and a reproducible HTML/CSS/JS case: wkhtmltopdf reporting issues.

  • Exact failing characters and a few characters that render correctly.
  • Minimal HTML, relevant CSS, and any JavaScript needed to reproduce the output.
  • Full wkhtmltopdf version/build string, operating system or container image, and the complete command line.
  • Input encoding and charset declaration, plus the font stack and font files involved.
  • Whether the failure affects the body, header, footer, or all of them, and whether a browser preview differs.

When to consider another PDF renderer

wkhtmltopdf’s GitHub repository was archived on January 2, 2023: wkhtmltopdf repository. If a controlled reproduction still fails after input, font, CSS, and runtime checks, evaluating a maintained renderer may be reasonable. The project’s status page discusses Puppeteer/Chrome as a more modern browser-engine direction: wkhtmltopdf status.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Migration is not a Unicode guarantee. Compare the new renderer against your actual HTML/CSS behavior, PDF layout, deployment support, operational constraints, and accessibility needs. Test the scripts and documents that matter before switching. Whichever rendering path you choose, sanitize untrusted HTML; the status page warns against processing it without sanitization.

Or skip the browser setup

For a website screenshot rather than an HTML-to-PDF conversion, ScreenshotNeo provides a screenshot API and MCP server. This does not replace wkhtmltopdf for generating a PDF from your own HTML document. For a page screenshot, one GET request returns an image or PDF; the following cURL example saves a WebP screenshot:

Quick Recap

Bestseller No. 1
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.; CREATE, COMBINE, SCAN and COMPRESS PDFs
$99.99
SaleBestseller No. 2
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.; Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
$74.99
Bestseller No. 3
Adobe Acrobat Pro | PDF Software | Convert, Edit, E-Sign, Protect | PC/Mac Online Code | Activation Required
Adobe Acrobat Pro | PDF Software | Convert, Edit, E-Sign, Protect | PC/Mac Online Code | Activation Required
Edit text and images without jumping to another app.; Convert PDFs to editable Microsoft Word, Excel, or PowerPoint documents.
$239.88
Bestseller No. 4
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.; EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
$99.99
Bestseller No. 5
PDF Pro 3 - PDF editor to create, edit, convert and merge PDFs - 100% Compatible with Adobe Acrobat - for Windows 11, 10, 8.1, 7
PDF Pro 3 - PDF editor to create, edit, convert and merge PDFs - 100% Compatible with Adobe Acrobat - for Windows 11, 10, 8.1, 7
ALL-IN-ONE SOLUTION – read, edit, convert, merge and protect your PDF files
$29.99
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for free ScreenshotNeo screenshots.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.