Recommended Free Tools
Wicked PDF uses the external wkhtmltopdf renderer, so uneven or incorrect letter spacing can come from your CSS, the renderer build, the operating system, or the fonts available to the process—not necessarily from Rails. Start by checking the exact binary and environment, then reproduce the problem with a minimal HTML file before changing styles or deployment settings. No single CSS declaration or renderer setting is established as a universal fix.
First identify what looks wrong
Two different problems are often described as a letter-spacing issue:
- The CSS spacing rule is not being applied as expected. The declaration might be absent from the rendered document, overridden by another rule, or behave differently in the renderer.
- The rule is applied, but the text still looks uneven. Font metrics or kerning—the adjustment of spacing between particular letter pairs—can make spacing look different in a PDF than in a browser.
Keep those cases separate while diagnosing. A browser preview that looks right does not prove the PDF renderer has the same CSS, fonts, or text-rendering behavior. Wicked PDF invokes wkhtmltopdf outside the Rails application, and its documentation notes platform-dependent rendering resolutions and the need to handle assets appropriately. See the Wicked PDF project documentation.
Record the renderer and host before changing anything
Begin with the environment that actually generates the affected PDF. Record the wkhtmltopdf version, operating system and version, and the path to the binary. In a shell, wkhtmltopdf --version reports a version for the binary found on that shell’s PATH; it does not by itself prove that a Rails process invokes that same binary. Confirm the executable configured for or reached by the production process, especially if development and production differ.
#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.
- Record whether the output is generated locally, in a container, or on a deployed host.
- Note the exact PDF-generation options, including any DPI or zoom settings already in use. Do not change them yet.
- Identify the intended font and whether it is installed and available to the process on the machine generating the PDF.
- Save one affected PDF and the corresponding HTML or Rails view output, if available, so you can compare the same content.
This matters because wkhtmltopdf reports include differences associated with operating systems and fontconfig, while the Wicked PDF documentation describes platform-dependent rendering resolution. A difference between hosts is evidence to investigate the environment, not proof that one particular setting is wrong. The upstream kerning discussion is a collection of reports and workarounds, not a guarantee that one change fixes every build: wkhtmltopdf issue #45.
Build a minimal reproduction and compare it with Rails
Reduce the problem to one representative string, the intended font, and the exact CSS declaration used in the affected content. Render the same minimal HTML directly with the same wkhtmltopdf binary and options as the application. For example, save this as spacing-test.html:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
body { font-family: Arial, sans-serif; font-size: 18px; }
.test { letter-spacing: 0.5px; }
</style>
</head>
<body>
<p class="test">AVATAR To Wa kerning and spacing</p>
</body>
</html>
Replace the example font and spacing value with the ones from the affected page. Then run:
wkhtmltopdf spacing-test.html spacing-test.pdf
Open the HTML in a browser and compare it with the resulting PDF. Also compare the direct-rendered PDF with the Rails-generated PDF. Use the same host, binary, and options for the direct test whenever possible; otherwise, a difference may be caused by the test environment rather than the CSS.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.
- If the minimal PDF is also wrong, focus on the renderer, font availability, CSS behavior, and host.
- If the minimal PDF looks right but the Rails PDF does not, inspect the actual HTML and loaded styles in the Rails path. Check for overridden rules, missing stylesheets, and differences in the content being passed to the renderer.
- If the CSS appears to be applied but letter pairs still look uneven, test font and text-rendering behavior rather than assuming the
letter-spacingdeclaration was ignored.
Check CSS delivery and asset paths in the PDF
Because wkhtmltopdf runs outside Rails, a stylesheet or font reference that works in a browser may not resolve in the PDF-generation process. Verify that the HTML supplied to the renderer includes the intended CSS and that referenced assets can be reached from the renderer. Wicked PDF’s documentation advises using absolute asset references or its PDF helpers for stylesheets, images, and JavaScript; see the project documentation.
Inspect the generated HTML or a simplified copy and confirm the declaration is present on the affected element. Look for a more specific selector, an inherited rule, or a later declaration that overrides it. Test only one change at a time, and retain the original HTML, command, and PDF so you can tell whether the change affected the output.
Test spacing values and units in isolation
If the rule is present but small spacing values appear ineffective, use the minimal page to test the exact value and nearby values or units. Do not infer a general threshold from a single report. In 2015, a user running wkhtmltopdf 0.12.2.3 on Windows 8 reported that values below 1px and 1em did not work as expected. That is a historical observation about one configuration—not a rule for current builds or other operating systems. The report is available in the wkhtmltopdf General mailing-list discussion.
Keep the font, text, host, and rendering options fixed as you compare values. If only a larger value changes the PDF, record that behavior as a finding specific to your reproduction; do not automatically apply the same threshold across the site.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.
Check fonts and test text-rendering rules carefully
Confirm that the intended font is installed and available to the user or service that runs wkhtmltopdf in the actual deployment environment. A font available to your desktop browser may not be present on a server. Compare results on the same host before changing DPI, zoom, or font settings; changing several variables together makes the cause harder to isolate.
You can also test these CSS declarations one at a time on the affected text:
.test {
text-rendering: optimizeLegibility;
}
/* In a separate test, try this instead: */
.test {
text-rendering: geometricPrecision;
}
These are experiments, not guaranteed remedies. A report for OS X 10.8.5 described improvement with a text-rendering rule but said table-of-contents items were unaffected. Test the precise content that fails, including tables or generated contents if those are the problem. The limited report and suggestions are in wkhtmltopdf issue #1734.
When the problem changes between hosts
If the same HTML renders differently on two machines, compare the inputs and environment rather than treating a CSS tweak as the first answer:
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 reinstallRank #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
- wkhtmltopdf binary and version actually invoked;
- operating system and version;
- installed fonts and fontconfig configuration;
- rendering options, including DPI and zoom behavior;
- HTML, CSS, and asset availability.
Issue reports mention fontconfig and DPI-related workarounds, but those reports are environment-specific. There is no cited universal host setting that resolves kerning or spacing defects across builds. Change one factor at a time, render the same minimal input, and compare the PDFs.
Escalate with a reproducible case
If the cause remains unclear, send maintainers a compact report that lets them reproduce the behavior. The wkhtmltopdf support page asks for the version, operating system and version, and a detailed test case. Include:
- the wkhtmltopdf version and exact binary path used by the application;
- the OS and version where the PDF is generated;
- minimal HTML and CSS that show the issue, plus any JavaScript necessary to reproduce it;
- the exact command and options, or the relevant Wicked PDF configuration;
- font name and relevant font availability details;
- the generated PDF and a clear description of the expected versus actual spacing.
The project’s reporting guidance is at wkhtmltopdf.org/support.html. A reduced reproduction is more useful than a full Rails application because it distinguishes renderer behavior from application-specific asset or stylesheet problems.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo is a website screenshot API, not a PDF renderer or a fix for Wicked PDF’s typography. It can provide a clean screenshot of a web page for visual comparison, but it does not establish whether wkhtmltopdf generated the correct PDF. Its screenshot API can capture a URL with one GET request; see the ScreenshotNeo API documentation for request options.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsBest 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
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Before capture, ScreenshotNeo accepts the cookie or consent banner like a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf tools for AI agents, including Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan.
Frequently asked questions
Does a correct browser preview prove the PDF should match?
No. The browser and wkhtmltopdf are separate rendering paths, and the PDF process may have different assets, fonts, platform behavior, or options. Compare the same minimal HTML in both before deciding what to change.
Can a screenshot API replace Wicked PDF for this spacing problem?
No. A screenshot service captures a web page as an image; it does not diagnose or correct the PDF output produced by Wicked PDF. Use it only as a separate visual reference if useful.
Is there a universally recommended wkhtmltopdf version or letter-spacing value?
The cited reports do not establish a current version or CSS value that fixes every spacing defect. The relevant behavior depends on the binary, OS, fonts, and page, so validate a proposed change with your own minimal reproduction.
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.

