Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errors“Lines rendering incorrectly” in a wkhtmltopdf PDF can mean three different failures: a CSS border is missing or malformed, a table row or rule is split at a page boundary, or boxes and null-like characters appear near text and font changes. Identify which symptom you have before changing CSS. Then record your wkhtmltopdf build and operating system, reduce the document to a minimal HTML/CSS/JS reproduction, and test one variable at a time.
The workflow below separates those cases, explains the documented controls that affect rendering, and shows when a workaround is only an old issue report rather than a generally proven fix.
1. Classify the line defect
Save the faulty PDF and a screenshot showing the page number, element, and exact location. Note whether the problem repeats for every row or only at a page break, and whether it changes when the font or viewport changes.
Missing or malformed borders
The visible line may be a CSS border, a pseudo-element, an SVG rule, or a table grid. A reset, inherited declaration, collapsed-table rule, clipping wrapper, transform, or print stylesheet can alter it before wkhtmltopdf paints the page.
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 →#1 Best Overall
- INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
- COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
- ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
- HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs
Lines or rows split across pages
A horizontal rule that appears at the bottom of one page may actually be a table row or container being fragmented. Page-break properties can be ignored in some large-table situations, so treat pagination as a separate defect from border styling.
Boxes, null-like characters, or stray glyphs
Unexpected squares or characters around line ends and font changes point toward text shaping or font availability rather than a border. Test with a known fallback font before changing layout rules.
2. Record the exact renderer and build
Run this on the machine that creates the PDF:
wkhtmltopdf --version
Keep the complete output, including patched-Qt or build details. Record the operating-system name and version, installation source, installed fonts, command-line options, input URL or file type, and output format. The wkhtmltopdf support instructions ask for the version, OS/version, and a detailed HTML/CSS/JS test case that reproduces the issue.
The official downloads page lists wkhtmltopdf 0.12.6 as the stable series and gives June 11, 2020 as its release date. That is an old release, not evidence that every current package is identical. Linux packages can require distribution-specific dependencies, so verify the binary actually running in production rather than relying on the package name.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →3. Reduce the document to a reproducible test
- Copy the smallest affected element into a new local HTML file.
- Retain only the rules needed to preserve the defect: table styles, wrappers, fonts, media queries, pseudo-elements, and page-break declarations.
- Remove analytics, unrelated scripts, remote assets, and other pages. Replace external fonts with a local fallback where possible.
- Render the same file repeatedly with the same command and compare PDFs. A deterministic failure is easier to diagnose than a document that changes during loading.
- Sanitize and isolate any untrusted HTML or JavaScript. The project warns that running wkhtmltopdf on unsanitized user content can lead to complete server takeover.
Keep the original and reduced files under version control. Change one declaration or command option per render and label each output so a visual improvement can be reversed.
4. Repair missing CSS lines and borders
Inspect the border in context
- Check the computed
border-width,border-style, andborder-coloron the element that should draw the line. - Look for inherited rules, resets such as
border: 0, and print-only CSS that overrides screen styles. - For tables, test
border-collapse: collapseversusseparateand specify cell borders explicitly while diagnosing. - Check parent elements for
overflow: hiddenor clipping, transforms, positioned layers, and zero-height wrappers. - Replace percentage dimensions with fixed dimensions in the reduced case to determine whether rounding or a shrinking container is involved.
Use a temporary, high-contrast rule to prove which box is responsible:
Rank #2
- CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
- INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
- PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
- ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴
table, tr, th, td, .rule-under-test { border: 1px solid #f00 !important; }
If the temporary rule appears, the problem is selector specificity or an override. If it does not, inspect clipping, layout dimensions, and whether the element exists in the printed DOM.
Responsive table wrappers
A historical GitHub report involving a Bootstrap responsive table said that changing a wrapper from overflow-x: auto to overflow-x: visible fixed that reporter’s PDF. This is not a universal recommendation: removing overflow can create a wider page or new clipping. Test both values in your reduced case and retain the one that preserves the required page width.
Use a print stylesheet deliberately
Put PDF-only rules in a dedicated stylesheet and apply it consistently. The command-line option --print-media-type makes wkhtmltopdf use print media rules; without it, a screen-oriented rule may remain active. The option does not repair arbitrary CSS, so compare output with and without it while recording the command.
5. Fix lines that break at page boundaries
Build a one-boundary test
Create a short table whose final row crosses exactly one page. Give the row enough content to reproduce the split, then vary row height, cell padding, and the surrounding container. This shows whether the break is caused by content size, a wrapper, or a renderer limitation.
- Test
page-break-inside: avoidon the row and its immediate container. - Test
page-break-beforeandpage-break-afteron block elements outside the table. - Remove floats and overflow containers temporarily.
- Check whether a transformed or absolutely positioned ancestor is being fragmented.
- Compare a table with and without
border-collapse; collapsed borders can make a split look like a missing line.
Historical issue reports describe lines breaking within rows and, in another case, page-break rules appearing to be ignored for large rows. They demonstrate that pagination behavior is document- and build-specific; they do not establish one CSS declaration that fixes every PDF.
Make the layout less fragile
Keep repeated table headers in <thead>, avoid placing a table inside an overflow-scrolling wrapper, and do not depend on a single hairline border to communicate structure. If a row must never split, reduce its content or divide it into smaller semantic rows; an oversized row cannot fit intact on a page regardless of the declaration.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
- INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
- KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
- PREMIUM SUPPORT - Strong technical expertise to solve issues faster
- THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.
6. Diagnose boxes and null-like characters
- Render the same text with a common installed fallback such as Arial, Liberation Sans, or another font known to exist on the target host.
- Confirm the selected font files are installed and readable by the account running wkhtmltopdf, not only by your interactive user.
- Remove web-font declarations and compare the result. Then add one font back at a time.
- Check the input for embedded NUL bytes or malformed character encoding before conversion.
- Repeat the test on the exact production build; a result from a different 0.12.x package is not proof for yours.
An older issue associated 0x00-like characters with selected fonts in 0.12.1-era builds and reported that removing the font style eliminated the symptom. A commenter suggested text-rendering: geometricPrecision, and the reporter said it helped that case. Treat this as an anecdotal, old-build workaround: test it on your own input before adopting it, and do not present it as a guaranteed fix.
7. Control renderer inputs while testing
The command-line manual documents controls that make experiments repeatable:
| Option | Diagnostic use |
|---|---|
--user-style-sheet FILE |
Add a controlled stylesheet to every page, useful for isolating a border or print rule. |
--print-media-type |
Use print media CSS instead of screen-oriented rules. |
--viewport-size WIDTHxHEIGHT |
Hold the layout viewport constant while testing responsive wrappers. |
--zoom FACTOR |
Check whether fractional sizing or rounding changes the defect. |
--dpi DPI |
Keep rasterization density fixed when comparing outputs. |
--page-size SIZE |
Use a known paper size for pagination tests. |
--page-width WIDTH and --page-height HEIGHT |
Control custom page dimensions when a boundary is sensitive to available space. |
These options control inputs; the manual does not promise that any one of them repairs a CSS or font defect. Record the complete command for each comparison.
8. A repeatable diagnostic command
For a local test file, start with an explicit page size and print media:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
wkhtmltopdf --print-media-type --page-size A4 test.html test.pdf
Then add only the option relevant to the hypothesis, for example:
wkhtmltopdf --print-media-type --viewport-size 1280x900 --zoom 1 --dpi 96 --page-size A4 test.html test.pdf
Do not assume that changing DPI, zoom, or viewport will cure a fault; the purpose is to determine whether the symptom depends on those variables.
Rank #4
- Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
- No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
- Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
- Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
- The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art
9. Troubleshooting by symptom
| Symptom | Likely area | Next test |
|---|---|---|
| Every border is absent | Print CSS, reset, selector specificity | Force a red border with !important; compare --print-media-type. |
| Only a responsive table loses its edge | Overflow clipping or width calculation | Test wrapper overflow values and a fixed viewport. |
| A row or rule breaks at one page | Pagination, oversized row, overflow or float | Use a one-boundary reduced table and vary page-break-inside. |
| Squares appear around text | Font selection, missing glyphs, encoding | Use an installed fallback and remove web-font declarations. |
| Only production fails | Different binary, OS packages, fonts, or command | Compare wkhtmltopdf --version, installed fonts, and the full command. |
| Output changes between runs | Remote assets or JavaScript timing | Localize assets, remove scripts, and keep the reduced fixture deterministic. |
10. When to escalate or evaluate another renderer
File a focused issue when the minimal case still fails. Include the exact version and build output, OS/version, sanitized HTML/CSS/JS, command line, expected appearance, actual appearance, and the PDF showing the defect. This is the information requested by the project’s support guidance.
If you evaluate another renderer, compare the features your document actually uses: CSS and layout coverage, pagination, headers and footers, browser/runtime requirements, platform packaging, maintenance activity, security controls for untrusted input, licensing and operating cost, and migration effort. A historical commenter said Puppeteer solved one personal case; that is a lead for testing, not a general recommendation or benchmark.
Or skip the browser setup
If your goal is a dependable image or PDF of a web page rather than debugging a local wkhtmltopdf pipeline, ScreenshotNeo makes one HTTP request and returns a PNG, JPEG, WebP, or PDF. Before capture it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and whether the request was billed.
Basic cURL request (see the ScreenshotNeo documentation for all options):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
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)
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}`);
ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. Features include full-page and element capture, device presets, custom CSS and JavaScript, waits, request blocking, headers and cookies, timezone and geolocation, PDF page controls, caching, signed links, asynchronous webhooks, bulk capture, and a usage API. Every feature is included on every plan. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up free.
Frequently Asked Questions
Does wkhtmltopdf 0.12.6 guarantee correct line rendering?
No. It is the stable series listed by the project, released June 11, 2020, but output still depends on the build, operating system, fonts, HTML, CSS, and command options.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated 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 matchShould I always change overflow-x to visible?
No. That value fixed one historical responsive-table report, but it can change page width or expose new clipping. Test it only in a reduced reproduction.
Is text-rendering: geometricPrecision an official fix?
No. It was an anecdotal suggestion in an older font-artifact issue. Reproduce the result on your target build before relying on it.
What information should accompany a bug report?
Provide the exact version and build, OS/version, smallest reproducible HTML/CSS/JS, command line, expected result, actual result, and the generated PDF.
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.

