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 →The reliable way to diagnose a repeating-header overlap is to reproduce it with one table, then test the table header, surrounding layout, and print overflow independently. If the header does not need to repeat, try thead { display: table-row-group; }. If it must repeat, keep display: table-header-group and add break-avoidance rules, then investigate nested tables, flex containers, and clipped wrappers. These changes are reported workarounds, not a universal fix for every wkhtmltopdf build.
What causes a repeated header to cover the next row?
wkhtmltopdf lays out HTML with its patched Qt WebKit engine. The overlap is a pagination defect reported in several forms: a repeated <thead> is painted over the first body row, a nested table repeats at the wrong position, or a wrapper’s print layout changes the available height after a page break. The reports do not establish one cause for every document.
Start by proving that the failure occurs at a page boundary. A header that is permanently positioned over content has a different cause from a header that is correct on page one and wrong only when it repeats. Keep your production wkhtmltopdf executable, command-line flags, paper size, margins, zoom, fonts, and HTML while reducing the markup; otherwise you may fix a simplified case that does not match the deployed renderer.
Build a minimal reproduction first
Save the following as thead-overlap.html. The script creates enough rows to force several pages, while the print rules model the behavior you want to test.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<style>
@page { size: A4; margin: 18mm 14mm 18mm; }
* { box-sizing: border-box; }
body { font: 12px Arial, sans-serif; margin: 0; color: #222; }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid #999; padding: 7px; text-align: left; }
thead { display: table-header-group; break-inside: avoid; page-break-inside: avoid; }
tr { break-inside: avoid; page-break-inside: avoid; }
.print-root { display: block; }
</style>
</head>
<body>
<div class='print-root'>
<table>
<thead><tr><th>Item</th><th>Description</th><th>Amount</th></tr></thead>
<tbody id='rows'></tbody>
</table>
</div>
<script>
var rows = document.getElementById('rows');
for (var i = 1; i <= 70; i++) {
rows.insertAdjacentHTML('beforeend', '<tr><td>' + i + '</td><td>Test row ' + i + ' with enough text to make page breaks visible.</td><td>$' + (i * 3) + '.00</td></tr>');
}
</script>
</body>
</html>
Render it with the same binary and settings used in production. Because the rows are generated by JavaScript, give the page a short delay:
wkhtmltopdf --enable-javascript --javascript-delay 200 thead-overlap.html reproduction.pdf
For a deterministic fixture, replace the script with static rows after you have confirmed the problem. Inspect the first row after every repeated header, not just the first page.
Apply fixes in a controlled order
1. Decide whether repetition is required
If a header on page one is sufficient, test this workaround:
thead { display: table-row-group; }
An archived issue comment reports that this avoids the duplicate-header overlap. The trade-off is explicit: the header no longer repeats on later pages. Do not use this rule when readers need column labels on every page.
2. Keep repetition and protect the header from a split
When the header must repeat, use the intended table-header display and ask the renderer not to split it:
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
thead {
display: table-header-group;
break-inside: avoid;
page-break-inside: avoid;
}
tr {
break-inside: avoid;
page-break-inside: avoid;
}
The modern break-inside declaration and the older page-break-inside declaration cover different parser generations. wkhtmltopdf may still ignore either declaration in a difficult layout, so verify the actual PDF rather than treating the CSS as a guarantee.
3. Remove nested tables from the repeating region
A report involving wkhtmltopdf 0.12.1 documented overlapping headers with nested tables. Another report associated wkhtmltopdf 0.12.0 with blank or corrupted pages in a related nested-table case. Flatten the markup where possible: use one outer table, move detail blocks below it, or render a nested table as a separate section. If nesting is unavoidable, create a fixture containing only the nested structure and test that exact build.
4. Replace print-time flex layout temporarily
Flex containers can alter the table’s computed height during print pagination. One issue commenter reported that changing a root flex container to a block fixed the overlap. Test a print-only override:
@media print {
.app-root,
.layout,
.table-region {
display: block !important;
}
}
Apply the rule to the actual flex ancestor, not just the table. Because this was a single-user report, keep the override only if it passes your representative documents.
5. Stop wrappers from clipping the table
Responsive wrappers often use overflow: auto or overflow: hidden. Those values can interfere with a table that grows across pages. For print, test:
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
@media print {
.responsive-table,
.table-scroll,
.table-wrapper {
overflow: visible !important;
height: auto !important;
max-height: none !important;
}
}
This is an investigation lead, not a guaranteed remedy. Remove only the clipping that affects the table; preserve intentional clipping elsewhere in the document.
6. Remove avoidable layout complexity
Keep the repeating header small. Move logos, filters, and multi-row summaries outside the table, avoid absolutely positioned children in <th> elements, and give images explicit dimensions. These changes make the page-boundary calculation easier to inspect, but they cannot correct a renderer defect by themselves.
Why common page-break CSS may still fail
A separate report using wkhtmltopdf 0.12.4 showed that combinations of page-break-inside and table-header-group could still produce an orphaned header or an awkward split. In other words, standards-oriented CSS expresses an intent; the patched Qt pagination engine decides whether it can honor that intent for a particular DOM and build.
A project member, ashkulz, described the behavior in an archived issue as “Nope, that is a part of the patched QT and can’t be controlled.” Read that as a historical maintainer comment about controlling the behavior through an option. It does not prove that every overlap has the same internal cause or that CSS never changes the result.
Troubleshoot by symptom
| Symptom | Likely suspect | Test and correction |
|---|---|---|
| Header overlaps only on page two or later | Repeated-header pagination | Render the minimal table; test table-row-group if repetition is optional, or retain table-header-group with both break-avoidance declarations. |
| Header overlaps only when a component is inside another table | Nested table layout | Flatten the structure and compare the PDF. If nesting is required, isolate it in a fixture and pin the tested binary. |
| Changing screen CSS changes the PDF dramatically | Flex layout in print | Use a print rule that changes the relevant flex ancestor to display: block, then check every page boundary. |
| Rows disappear behind a scroll region | Overflow or fixed height on a wrapper | Set print overflow to visible, remove max-height, and let the wrapper have automatic height. |
| Header appears twice at the same boundary | Multiple header rows or nested table headers | Inspect the DOM for more than one <thead> in the repeating region and remove duplicate markup. |
| Blank or corrupted pages after simplifying CSS | Build-specific pagination or nested content | Compare with the 0.12.0/0.12.1-era reports, reduce the fixture further, and test another maintained renderer before changing production templates. |
| An orphaned header remains despite page-break rules | Renderer limitation | Try a smaller header, fewer nested elements, and a different page size; do not assume another declaration will force compliance. |
Validate the fix before shipping
- Test the exact binary. Record the output of
wkhtmltopdf --versionand use that executable in local, CI, and production tests. - Use production page settings. Match paper format, margins, orientation, zoom, header/footer options, local-file permissions, and font installation.
- Exercise boundary cases. Include a table that ends one row before a page break, exactly at a break, and one row after it. Include long text, wrapped cells, images, and an intentionally tall row.
- Inspect every page. A fix that works on page two can fail when a later row has a different height. Check that the repeated header is visible, occupies its own space, and is followed by the first body row.
- Keep the fixture in regression tests. Store the HTML and expected PDF or page images. Re-run it whenever the wkhtmltopdf package, fonts, CSS framework, or template changes.
Performance, reliability, and operating cost
Measure rendering time with the same network policy and assets used in production. JavaScript delays, remote images, web fonts, large tables, and complex nested layout all make a reproduction less deterministic. For reliable tests, serve assets locally, wait only as long as the page needs, and avoid changing several variables in one experiment.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
wkhtmltopdf’s upstream repository was archived on January 2, 2023. The archive is read-only; that status does not describe every fork or downstream package. If this pagination defect is production-critical, the maintenance cost of carrying a workaround may exceed the effort of evaluating another renderer. Keep the old and candidate renderers side by side until page breaks, fonts, CSS fidelity, and deployment requirements have been compared on the same fixture.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesThere is no evidence here for a universal failure rate, speed ranking, or cost ranking. Treat any such number from an unrelated benchmark as irrelevant unless it matches your HTML, binary, fonts, and hosting environment.
When to evaluate a different renderer
A community post mentions headless Chrome as an alternative for rendering arbitrary web pages, but it does not provide a controlled comparison of pagination, fidelity, performance, or operating cost. If you migrate, compare candidates using:
- Repeated-header behavior exactly at page boundaries.
- Long tables, nested structures, and rows that cannot be split.
- Required CSS features, fonts, images, JavaScript, and print colors.
- Container or server requirements, sandboxing, startup time, and patching responsibility.
- How failures are reported and whether you can reproduce a bad PDF from saved HTML and assets.
Do not infer that a different engine will automatically fix the document. Render the same representative HTML with the same expected page size and compare the resulting PDFs page by page.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If your goal is to capture a public URL rather than debug wkhtmltopdf’s pagination, ScreenshotNeo makes a single request to return a PNG, JPEG, WebP, or PDF. It accepts cookie and consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. It also provides an MCP server for Claude, Cursor, and other MCP clients, with take_screenshot, get_page_info, and capture_pdf tools.
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 →See the ScreenshotNeo documentation for parameters. The same endpoint supports full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets or custom viewports, retina scale, PDF paper size/margins/orientation/page ranges, custom CSS and JavaScript, pre-capture clicks, hidden selectors, waits for a selector or network idle, blocked ads/trackers/requests/resource types, custom headers/cookies/user agents/Authorization, timezone and geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed public-image links, asynchronous jobs with signed webhooks, up to 100 URLs per bulk call, usage reporting, and an OpenAPI specification.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
cURL
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)
r.raise_for_status()
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}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan, and yearly billing gives two months free. Create a free ScreenshotNeo account to try the endpoint without adding a card.
Frequently asked questions
Does changing the header to a row group preserve accessibility?
It changes print repetition, not the semantic HTML. Keep a real <thead> for table semantics, and use the row-group rule only when losing repeated labels is acceptable for your readers.
Should I upgrade from an old wkhtmltopdf build first?
Do not assume an upgrade will solve this particular overlap. Capture the current version, reproduce the defect, and test the exact candidate package against the same fixture before replacing a production binary.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Can a screenshot service reproduce my local HTML file?
ScreenshotNeo captures a URL through its API. For private or local-only HTML, first publish it behind an appropriately secured URL or continue using your local renderer; the service is not a drop-in replacement for a local wkhtmltopdf command.
Frequently Asked Questions
Can I force wkhtmltopdf to repeat a header with a command-line switch?
The reported fixes are CSS and markup changes. The archived issue discussion does not establish a command-line option that universally controls the overlap.
What should I compare when choosing a replacement engine?
Use one representative fixture and compare page-boundary headers, long and nested tables, required CSS and fonts, deployment requirements, and how each engine exposes failures.
Does ScreenshotNeo change the CSS pagination rules in my HTML?
No. It captures a URL as an image or PDF; it is useful when you need a hosted capture workflow, not as a CSS patch for a local wkhtmltopdf document.
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 minuteQuick 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.

