First determine whether the PDF has an encoding problem or a missing-font problem. If characters are decoded into the wrong text, check the input bytes and charset declaration. If only particular symbols or scripts appear as squares or disappear, check whether the wkhtmltopdf process can find a font containing those glyphs. Adding a UTF-8 option cannot repair missing font coverage, and a font change will not correct wrongly decoded bytes.
The fix must be verified with the same wkhtmltopdf binary and runtime environment that produces the affected PDF. The project documentation identifies 0.12.6 as its stable series, released June 11, 2020; that is the version information established here, not a claim about later releases.
Identify the kind of character failure
Look at the actual PDF and classify what is wrong before changing options. “Unicode is broken” can describe several different symptoms, and each points to a different cause.
| What you see | Likely branch to investigate first |
|---|---|
| Readable text is replaced with unrelated or garbled characters | Input bytes, character decoding, or a charset declaration that does not match the bytes |
| Boxes, blank spaces, or missing characters appear only for a script or a few symbols | Font coverage and font discovery by the wkhtmltopdf runtime |
| Some non-ASCII text works but a particular language, symbol, or character range does not | Whether the selected font, or a fallback font available to wkhtmltopdf, contains those exact glyphs |
| The browser display looks right but the PDF does not | Differences in fonts and fallback available to the browser versus the environment running wkhtmltopdf |
These are diagnostic clues, not conclusive tests. Individual reports document missing characters on CentOS 7 with wkhtmltopdf 0.12.3 and a Windows 10 / 0.12.5 case where characters visible in a browser did not make it into the PDF. Those reports demonstrate possible failure patterns; they do not establish a universal fix for other systems.
#1 Best Overall
- 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.
Check that the input encoding matches the actual bytes
If characters are broadly garbled, inspect the data before adjusting fonts. The HTML’s encoding declaration has to describe the bytes actually used to store or deliver that HTML. Declaring UTF-8 does not convert content that is encoded differently into UTF-8.
For an HTML file
- Confirm the file’s actual encoding, rather than relying only on an editor’s display or a declaration in the document.
- Check that the HTML charset declaration agrees with those bytes. If your application creates the file, inspect the encoding it uses when writing the response or file.
- Use a minimal file with the failing text and a plain Latin word beside it. That makes it easier to tell whether the issue affects the whole input or only selected characters.
For a URL or generated HTML
- Check both the HTML declaration and, for URL input, the HTTP response charset. A declaration and response that disagree can complicate diagnosis.
- Confirm what your application actually sends. A browser’s rendered page alone does not show whether the bytes and metadata delivered to the PDF process are correct.
- If your application produces the HTML, follow the bytes from its source through the response or temporary file consumed by wkhtmltopdf.
Use the default encoding only when it is genuinely missing
The wkhtmltopdf binding settings document calls the default setting web.defaultEncoding and describes it as the encoding assumed when content does not specify it properly; it gives utf-8 as an example. Set the command-line or binding equivalent only when the content lacks a usable encoding declaration and you have confirmed what encoding its bytes use. The setting is a default assumption, not a converter that can safely fix any mismatch.
A report of Chinese text remaining wrong despite UTF-8 declarations in the HTML and on the command line illustrates why that option is not a guaranteed repair. The report was marked invalid, so it should not be read as a verified diagnosis or a general result. The practical lesson is to verify the actual input and continue to the font branch if the symptom does not fit an encoding mismatch.
Rank #2
- 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.
Check font coverage when only some glyphs fail
UTF-8 describes how text is encoded; it does not ensure that a chosen font contains every character. If most text is correct but specific symbols, scripts, or ranges render as boxes or blank spaces, find out whether a font available to the wkhtmltopdf process includes those glyphs.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute- Write down the exact characters or script that fail. Include a few that work in the same string so you can compare them in one PDF.
- Identify the font family requested by the HTML or CSS for that text. Check whether that font covers the failed characters.
- If it does not, select a suitable font that does. Ensure the font file is installed or otherwise available to the environment that runs wkhtmltopdf, not just to your desktop browser.
- Generate the minimal PDF again and inspect the output. If a font change does not help, check the runtime’s font discovery and fallback configuration rather than assuming the charset is at fault.
Browsers may select fallback fonts that wkhtmltopdf does not find or select in the same way. In one Windows 10 / wkhtmltopdf 0.12.5 report, the browser used Yu Gothic UI, Nirmala UI, and SimSun alongside the requested font. That is evidence about that reported environment, not a guarantee about every Windows setup. A CentOS 7 issue discussion likewise described missing Unicode characters and the user later reported that additional fonts were needed; it does not identify a package suitable for every distribution or language.
Verify fonts in the deployed runtime
Diagnose the environment that creates the PDF. A font installed on a developer’s workstation may not be present inside a container, serverless package, service account environment, or production host. Even when the font file is present, the process needs font configuration that allows it to be discovered.
Rank #3
- 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.
The wkhtmltopdf project documents runtime dependence on installed fonts and on fontconfig and freetype2. Its Lambda example sets FONTCONFIG_PATH=/opt/fonts. That path belongs to the documented example; it is not a universal location for other deployments.
- Inspect the fonts and font configuration in the same image, package, or host used in production.
- Provide a font that covers the affected characters and make sure the runtime can discover it.
- Check that the process has access to the font files and relevant configuration, including after deployment or a fresh container start.
- Use distribution-specific installation instructions for your runtime. Package names and paths vary, so do not assume one font package will cover every script.
If the PDF works locally but fails after deployment, compare the local and deployed font files, font configuration, and wkhtmltopdf binary. Treat a browser preview as a separate rendering environment, not as proof that the PDF process has the same fallback fonts.
Recommended Free Tools
Reproduce the failure with a minimal PDF
A small, repeatable case prevents unrelated page styling and content from obscuring the cause. The sources document different encoding and font failures rather than a universal diagnostic test; use this procedure to isolate variables in your own environment.
Rank #4
- 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
- Create a minimal HTML file containing the exact failing characters, nearby Latin text, and as little styling as possible.
- Run it through the same wkhtmltopdf binary, options, operating system or container, and font configuration used in production.
- Inspect the resulting PDF itself. A correct browser rendering is not a substitute for checking the generated PDF.
- Change one thing at a time: the input bytes or charset metadata, the default encoding if the input has no valid declaration, the font family or installed fonts, or runtime font configuration.
- Record the change and result. Once the minimal case works, apply the fix to the full document and test there too.
If local-file input works but URL input fails, or the reverse, compare the actual HTML bytes and metadata for each path, as well as the environment and resources available to the process. The available issue reports do not establish a general rule that one loading mode handles Unicode better than the other.
Troubleshoot by symptom
Text turns into mojibake or unrelated characters
- Check: actual bytes, the HTML charset declaration, and the HTTP response charset when the input is fetched from a URL.
- Fix: make the declared or supplied charset match the bytes. Set the default encoding only if the content has no proper declaration and you have verified the intended encoding.
- If it persists: reduce the page to a minimal example and confirm which HTML or response wkhtmltopdf actually receives.
Boxes or blanks affect only selected symbols or scripts
- Check: whether the font selected for that content covers the affected glyphs, and whether the wkhtmltopdf process can discover that font.
- Fix: provide an appropriate font and make it available through the runtime’s font configuration.
- If it persists: verify fonts in the deployed environment and test a minimal PDF using the same binary and runtime configuration as production.
Browser text is right, but the PDF is not
- Check: whether the browser and the wkhtmltopdf runtime have the same relevant fonts and fallback options. The issue report involving Yu Gothic UI, Nirmala UI, and SimSun shows that fallback can differ in a reported Windows environment.
- Fix: make the needed font available to the wkhtmltopdf runtime and test its output directly. Do not rely on the browser preview alone.
A UTF-8 declaration or default did not help
Recheck the bytes and the source’s charset metadata, then determine whether the failing characters point instead to missing glyphs. Neither a declaration nor a default encoding setting supplies a font. Change one variable per reproduction so a successful result can be tied to a cause.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Version context
The wkhtmltopdf downloads page identifies 0.12.6 as the stable series and gives June 11, 2020 as its release date. The usage documentation labels its command-line reference 0.12.6 with patched Qt, and the project repository is archived. These facts identify the official version information established here; they do not verify a newer official release or ongoing upstream maintenance. If your installation is a distribution package or another build, check its own version and packaging details rather than assuming it matches the documented build.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Best Value
- 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
Or skip the browser setup
ScreenshotNeo is a website screenshot API, not a wkhtmltopdf replacement and not a way to repair Unicode in an existing PDF. If your separate task is to capture a webpage as an image or PDF without installing and managing a browser, ScreenshotNeo offers a one-request API and an MCP server for AI agents. Its capture options include PNG, JPEG, WebP, or PDF; cookie banners, newsletter popups, and chat widgets are removed before capture, with each step configurable. Bot checks, blank pages, failed loads, and cache hits are not billed; responses include X-Page-Verdict and X-Billed headers. Claude, Cursor, and other MCP clients can use its take_screenshot, get_page_info, and capture_pdf tools.
For a one-call screenshot, replace the example URL and access key with your target and key. See the API documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for free.
Quick Recap
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.




