Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesShort answer: request the PDF Standard 14 (Base 14) families in your CSS, pin and record the exact wkhtmltopdf build, generate the file in the same environment used in production, and verify the result with pdffonts. A CSS name such as Helvetica does not prove that the PDF contains a non-embedded Helvetica Type 1 reference. Fallback fonts, fontconfig, patched Qt builds and platform differences can change the emitted objects. With QPrinter, call setFontEmbeddingEnabled(false) only where the target print engine supports it, then inspect the PDF rather than trusting the setter.
What “PDF core fonts” means
PDF core fonts are the Standard 14 Type 1 fonts defined by Adobe: Times-Roman, Helvetica, Courier, Symbol, ZapfDingbats and their standard bold, italic and oblique variants. A PDF consumer is expected to have these fonts, or their metrics and suitable substitutes, so a file can reference them without carrying the original font program.
This is different from installing Arial, Times New Roman or another desktop font. Those files are not automatically the PDF Standard 14 fonts. A renderer may use an installed substitute, embed it, create a subset, or fall back again when a glyph is missing. The generated PDF, not the CSS source or the appearance in one viewer, is the authority.
Use core-font names with wkhtmltopdf
1. Pin the renderer and record its build
Start by recording the executable and its Qt build:
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows 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 reinstall#1 Best Overall
- 1 ream (500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
- Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
- Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
- Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
- Virgin copy paper providing professional quality results; acid-free to prevent yellowing
wkhtmltopdf --version
The wkhtmltopdf usage documentation describes the 0.12.6 line with patched Qt, but distributors can package different patches, font libraries and system dependencies. Keep the exact version, operating-system image and container digest with your build artifacts. An issue dated 2015-10-26 (wkhtmltopdf 0.12.2.1 with Qt 4.8.6) demonstrates why two installations can expose different font rows even when the HTML is identical.
2. Ask for a canonical Standard 14 family in CSS
Use the PDF names deliberately and specify weight and style explicitly:
/* print.css */
html, body {
font-family: Helvetica, Arial, sans-serif;
font-weight: normal;
font-style: normal;
}
h1, h2, h3 {
font-family: Times, "Times New Roman", serif;
font-weight: bold;
}
code, pre, table.data {
font-family: Courier, "Courier New", monospace;
}
em { font-style: italic; }
strong { font-weight: bold; }
Helvetica, Times and Courier are useful CSS requests, but they are not a guarantee about the PDF objects. Keep fallback lists intentional: a fallback can improve rendering on a host that lacks the requested family, while also causing an embedded non-core font to appear in the output.
3. Keep the character repertoire realistic
Standard 14 encodings do not provide broad Unicode coverage. Basic Latin punctuation and Western European text are usually reasonable candidates; emoji, many mathematical symbols, Cyrillic, Greek, Arabic, Hebrew, CJK text and specialist scripts require a font with those glyphs. If the document needs those characters, choose an embeddable font policy instead of forcing a core-font name. Missing glyphs can become blank boxes, replaced characters or a fallback font.
4. Render in the deployment environment
Run wkhtmltopdf in the same container or host image used in production. Fontconfig configuration, installed fonts, locale, language shaping libraries and the private or patched Qt bundled by a distributor can all affect fallback. Do not validate on a developer laptop and assume the server will emit the same font table.
Rank #2
- HP Papers is sourced from renewable forest resources and has achieved production with 0% deforestation in North America. Each ream is wrapped in a polyurethane coated paper wrapper to protect the cut sheets from moisture damage
- Sheet size – 8.5 x 11; Thickness – 20 pounds; Brightness – 92 bright white
- HP Copy&Print20 20 pounds printer paper is Forest Stewardship Council (FSC) certified and contributes toward satisfying credit MR1 under LEED (Leadership in Energy and Environmental Design)
- All HP Papers provide premium performance on HP equipment, as well as on all other printer and copier equipment; 100% satisfaction guaranteed; ColorLok technology provides more vivid colors, bolder blacks and faster drying
- Superior quality, reliability, and dependability for high-volume printing at home, at school and in the office; HP Copy&Print20 print and copy paper prevents yellowing over time to ensure a long-lasting appearance for added archival quality
A minimal conversion is:
wkhtmltopdf --print-media-type input.html output.pdf
Use your normal page-size, margin, JavaScript and delay options as required by the document. Those layout options do not turn a fallback font into a Standard 14 reference.
5. Inspect every generated PDF
Install Poppler’s pdffonts (or an equivalent PDF inspector) in your validation job:
pdffonts output.pdf
Record the columns name, type, encoding, emb, sub and uni for every row. A core-font result normally shows a Standard 14 Type 1 name and no embedded font program; an embedded TrueType/OpenType row indicates that the renderer used another font. A sub value of yes is not automatically an error: it means only the glyphs used by the document were included.
Free tools Windows power users keep installed
One-click scans. No signup required.
6. Define acceptance criteria before release
“Use core fonts” can describe several different requirements. Test the requirement you actually have:
| Requirement | What to inspect | Typical implication |
|---|---|---|
| Standard 14 reference | Font name, Type 1 type, encoding and emb in pdffonts |
Core-font references are acceptable; a fallback row may fail the check. |
| Visual appearance | Rendered pages in the viewers and printers your users have | A metrically similar substitute may be acceptable even if it is embedded. |
| Searchable Unicode text | uni column plus copy/search tests for representative characters |
Choose a font and encoding that cover the actual text. |
| PDF/A or another profile | That profile’s validator, not only pdffonts |
The profile may require embedding, making a core-font-only policy unsuitable. |
QPrinter: disabling font embedding
Qt exposes a font-embedding switch on QPrinter. The basic PDF setup is:
Rank #3
- 3 ream case (1,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
- Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
- Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
- Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
- Virgin copy paper providing professional quality results; acid-free to prevent yellowing
#include <QPrinter>
#include <QDebug>
QPrinter printer(QPrinter::HighResolution);
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName("output.pdf");
printer.setFontEmbeddingEnabled(false); // only where the backend supports it
qDebug() << "font embedding enabled:" << printer.fontEmbeddingEnabled();
setOutputFormat(QPrinter::PdfFormat) selects PDF output, and setOutputFileName() supplies the destination. The getter reports the printer’s current setting; it does not prove that a particular print engine honored it.
Platform and version caveat
Archived Qt 4 documentation states that font-embedding control was supported only on X11. That limitation matters for legacy applications and wkhtmltopdf-era private Qt builds. On Windows, macOS or a newer Qt print engine, behavior depends on the Qt version and backend. Check the runtime value, note the platform, and inspect the resulting PDF on every supported deployment target.
Do not assume that wkhtmltopdf’s patched/private Qt uses the same behavior as the Qt SDK used to compile your application. If you need a firm non-embedding guarantee, make the PDF inspection a release gate rather than relying on the setter.
How to read the font table
Compare outputs from a known-good host and a suspect host with the same command:
pdffonts production.pdf > production.fonts.txt
pdffonts workstation.pdf > workstation.fonts.txt
diff -u workstation.fonts.txt production.fonts.txt
Look for these patterns:
- Standard 14 name, Type 1, not embedded: consistent with a core-font reference.
- TrueType or OpenType,
emb=yes: the renderer used an installed or bundled font instead of a core reference. sub=yes: only used glyphs were embedded; this can be intentional and reduces file size.- Unexpected encoding or
uni=no: copy/search behavior may not meet a Unicode requirement. - Several rows for one CSS family: different weights, styles, scripts or fallback runs were emitted.
Inspect representative characters, not just the family name. A document containing a single unsupported symbol can add a fallback row while the rest of the page remains Helvetica or Times.
Rank #4
- 5 ream case (2,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
- Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
- Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
- Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
- Virgin copy paper providing professional quality results; acid-free to prevent yellowing
“Or skip the browser setup”
If your goal is to obtain a clean image or PDF of a web page rather than manage a local browser and font environment, ScreenshotNeo provides a website screenshot API. Its capture endpoint is:
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 options. The same request in Python is:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
And in Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
- Cookie and consent banners, newsletter popups and chat widgets are removed before the shot.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed; response headers identify the page verdict and whether it was billed.
- An MCP server lets Claude, Cursor and other MCP clients call
take_screenshot,get_page_infoandcapture_pdf. - The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Every feature is available on every plan.
Sign up for the free ScreenshotNeo plan to try it without a card.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting wkhtmltopdf and QPrinter fonts
The PDF contains an unexpected embedded font
Check the CSS family actually selected, then inventory fonts and fontconfig on the rendering host. A CSS request can fall back before Qt creates PDF objects. Compare wkhtmltopdf --version, installed fonts, locale, container image and pdffonts output between hosts. Remove an unintended fallback or adopt an explicit embedding policy if the glyphs require it.
setFontEmbeddingEnabled(false) appears ineffective
Confirm the Qt version, operating system, print engine and whether the application uses a patched or private Qt. The Qt 4 X11-only note is especially relevant to legacy deployments. Check fontEmbeddingEnabled(), then inspect the PDF; either result can differ from what the setter suggests.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Best Value
- Made in USA: HP Papers is sourced from renewable forest resources and has achieved production with 0% deforestation in North America.
- Optimized for HP technology: All HP Papers provide premium performance on HP equipment, as well as on all other printer and copier equipment.
- Perfect everyday office paper: Superior quality, reliability, and dependability for high-volume printing at home, at school and in the office. Perfect for everyday black and white printing.
- Certified sustainable: HP Office20 20lb printer paper is Forest Stewardship Council (FSC) certified and contributes toward satisfying credit MR1 under LEED (Leadership in Energy and Environmental Design).
- ColorLok technology printing paper: ColorLok technology provides more vivid colors, bolder blacks and faster drying.
Text is missing or replaced
The selected core encoding probably lacks one or more characters. Identify the failing code points, choose a font containing them, and define whether that font must be embedded. Do not trade readable text for a nominal core-font name.
Two hosts produce different font rows
Diff the renderer version, Qt packaging, fontconfig configuration, installed font inventory, locale and container image. Regenerate both files and run pdffonts under the same validation command. The first differing row usually identifies the fallback or weight/style that diverged.
The file looks right but fails compliance
Visual similarity is not proof of Standard 14 usage, Unicode searchability or PDF/A conformance. Run the validator required by your contract and retain the font-table output as build evidence. A profile that requires embedded fonts may intentionally reject a core-font-only file.
Performance, reliability and maintenance
- Performance: Core-font references can avoid carrying large font programs, but the saving is workload-dependent. Subsetting already limits embedded files to used glyphs, so measure your actual PDFs rather than assuming a fixed reduction.
- Reliability: Pin the wkhtmltopdf binary and OS image, set locale explicitly, and run a font-table check in CI. Treat changes to the renderer package or installed fonts as potentially layout-affecting.
- Portability: Standard 14 references rely on viewer substitutions and limited encodings. They are not a universal solution for multilingual, branded or archival documents.
- Licensing: If you select an embeddable commercial or web font for visual fidelity, verify its PDF embedding rights separately from the renderer configuration.
- Debugging: Keep the source HTML, CSS, renderer version, host font inventory and
pdffontsreport together so a changed row is explainable.
Choosing the right policy
| Need | Recommended policy |
|---|---|
| Small, Latin-only operational PDFs where viewer substitution is acceptable | Request Helvetica, Times or Courier; pin the environment and verify Standard 14 rows. |
| Exact brand typography across platforms | Use a licensed font with an explicit embedding policy and test rendered pages. |
| Multilingual or symbol-heavy content | Select fonts with the required glyphs; validate copy/search and embed as necessary. |
| PDF/A or regulated archival output | Follow the profile’s font rules and run its validator; do not assume core fonts qualify. |
| Legacy QPrinter application | Check backend support at runtime, especially on non-X11 systems, and inspect output. |
Frequently Asked Questions
Does using the CSS generic family serif select Times-Roman?
No. Generic families are resolved by the host’s font configuration. Use a deliberate family list and verify the emitted PDF rows instead of treating a generic name as a Standard 14 guarantee.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Is an embedded subset always a defect?
No. A subset contains only glyphs used by the document and can be an intentional way to keep files portable and smaller. It is a defect only when your acceptance rule requires a non-embedded Standard 14 reference.
Can a PDF viewer make a core-font file look different?
Yes. Standard 14 references allow a consumer application to use the available font metrics or a suitable substitute. If identical appearance is required, test the target viewers and use an explicit embeddable font policy.
Should I remove all installed fonts from a build container?
Usually not. Removing fonts can expose missing-glyph failures and unexpected fallback. A better practice is to pin and document the inventory, then test the actual character repertoire and inspect every output.
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.




