Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsPut every header row inside a semantic <thead>, keep body rows in <tbody>, and apply break-inside: avoid-page to the header group (with page-break-inside: avoid as a legacy alias). This is the correct starting point for print and PDF output, but it is not a promise that every browser or HTML-to-PDF engine will keep a complex rowspan header intact. Validate the generated PDF in the exact renderer, version, page size, margins, and fonts you ship.
Use semantic table sections first
Pagination works best when the markup expresses the table structure. A multi-row header belongs in one <thead>; data belongs in <tbody>. Cells that cover multiple header rows should use rowspan only for the rows they actually span, and each row must still produce the intended column count when spans are resolved.
<table class="report">
<thead>
<tr>
<th rowspan="2" scope="col">Product</th>
<th colspan="2" scope="colgroup">Q1</th>
<th colspan="2" scope="colgroup">Q2</th>
</tr>
<tr>
<th scope="col">Units</th>
<th scope="col">Revenue</th>
<th scope="col">Units</th>
<th scope="col">Revenue</th>
</tr>
</thead>
<tbody>
<tr><th scope="row">Example</th><td>10</td><td>$100</td><td>12</td><td>$120</td></tr>
</tbody>
</table>
Do not wrap <thead> or <tbody> in arbitrary elements that change table layout. Invalid nesting, mismatched spans, or an incorrect column structure can look like a pagination bug while actually producing an ambiguous table for the layout engine.
Apply modern and legacy break rules in print CSS
break-inside controls whether a generated box may be fragmented. Use the page-specific value for paged output and retain the older property for compatibility with print engines that still recognize it.
#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.
@media print {
thead,
thead tr {
break-inside: avoid-page;
page-break-inside: avoid; /* legacy alias */
}
thead {
display: table-header-group;
}
}
MDN documents break-inside: avoid-page for page breaks and break-inside: avoid for breaks generally in its break-inside reference. The older page-break-inside property is deprecated for new work but remains a backwards-compatibility alias; MDN maps its avoid value to the modern behavior in the page-break-inside reference.
Why set the rule on both the section and rows?
A table header is a group containing rows, while a rowspan cell can participate in more than one row. Applying the rule to the <thead> and its <tr> elements gives engines more suitable boxes on which to honor the constraint. It is a practical starting point, not a cross-engine guarantee; some engines fragment complex table structures despite these declarations.
Header repetition is different from keeping a header together
display: table-header-group allows a header to be repeated when a table continues on later pages. Avoiding a split controls fragmentation. A header can repeat and still fail to remain an indivisible multi-row block if the renderer cannot satisfy all constraints.
The CSS Table Module Level 3 specifies conditional repetition. In paged media, user agents must repeat header and footer rows when the page is the table’s fragmentainer, the header or footer has break avoidance, the space required is less than two quarters of the page height (up to one quarter for the header and one quarter for the footer), and repetition would not display a row twice on that page. Those conditions mean a very tall header, especially one with wrapped labels and generous padding, may not repeat as you expect.
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.
Why rowspan headers still break in Puppeteer or Chrome PDFs
A reported case closely matching this problem used Puppeteer with Chrome, a dynamic <thead>, and rowspan. The author tried page-break-inside: avoid on <thead>, <tr>, and <th> without getting the desired PDF. That experience is useful evidence that the declarations are not a universal fix; it is not proof that every Chrome version behaves identically.
Pagination is a constraint-solving process. CSS 2.2 explains in its paged-media specification that avoid constraints may be relaxed when honoring them would leave too few legal breakpoints to fit content without overflow. A long table, a header taller than the available page area, large margins, or font substitution can therefore cause an apparent violation.
A diagnostic workflow when the header still splits
- Confirm the generated markup. Save the final HTML sent to the PDF service. Verify one
<thead>contains all related header rows, everyrowspanreaches the intended row, and each body row resolves to the same number of columns. - Inspect print styles. In browser developer tools, emulate print media and inspect computed styles. Look for a later rule that sets
break-inside: auto, changesdisplay, or applies overflow to a table ancestor. - Measure header height. Reduce excessive padding, line-height, and long labels that wrap. Keep the repeated header within the specification’s one-quarter-page condition where possible.
- Test section-level and row-level rules. Keep the declarations on
<thead>and<tr>; test a suitable wrapper only if your renderer supports it without changing table layout. Do not assume adding the rule to every<th>will solve a rowspan fragmentation issue. - Check the exact renderer. Generate PDFs with the same Puppeteer/Chrome version, paper format, margins, scale, fonts, and operating environment used in production. A result in a normal browser print preview does not establish identical PDF output.
- Simplify if necessary. Replace a deeply stacked visual header with fewer rows or a visually equivalent layout. Fewer fragmentation boundaries are often more reliable than increasingly complex CSS.
- Regenerate after each change. Changing page size, margins, fonts, or renderer versions can alter where the break occurs, so inspect the resulting PDF rather than relying on a screen preview.
Keep avoidance targeted
Do not put break-inside: avoid on an entire long table unless moving the whole table as one unit is acceptable. A table containing many pages of rows cannot always fit as an indivisible box, and broad avoidance can remove useful breakpoints or create overflow. Restrict the rule to the header group and, if needed, a small logical group of rows.
Optional layout tactics and their trade-offs
Start each table on a new page
A forced break before a table can prevent its header from landing at the bottom of a page. It also wastes remaining space and places every table on a new page, so use it only when that layout is acceptable.
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 {
.report + .report {
break-before: page;
}
}
Reduce the header’s physical size
Shorten labels, reduce print-only padding, prevent avoidable wrapping, and use a print-specific font size. Keep accessibility and readability in mind; shrinking text until it is unreadable is not a reliable fix.
Render a simpler print header
When the screen table needs a complex grouped header, a print-only variant with fewer stacked rows can preserve the same information while reducing fragmentation risk. Ensure the alternate markup remains accessible and that only one version is exposed to print at a time.
Validate accessibility while fixing pagination
Use scope="col" or scope="colgroup" for column headers and scope="row" for row labels. Keep header associations intact when simplifying a rowspan layout. A visually correct PDF that loses relationships for screen readers is not a complete fix.
Or skip the browser setup
If your goal is a clean PDF or image of a page rather than debugging a local print pipeline, ScreenshotNeo provides a single screenshot API request. Its cleanup step 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 the response identifies the page verdict and billing status in headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
For API parameters and PDF options, see the ScreenshotNeo documentation.
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
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()));
ScreenshotNeo’s free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account to try the API.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting checklist
The header does not repeat
Check that the rows are inside <thead>, the section has display: table-header-group in print CSS, and the header is not taller than the available page area. Confirm that the renderer supports repeated table headers in its PDF mode.
The first header row repeats but the rowspan cell looks wrong
Review the span matrix. A cell with rowspan="2" occupies a column in both header rows; do not add a second cell in that column on the lower row. Incorrect spans can make the repeated fragment appear to be a pagination failure.
Rules work in print preview but not in a generated PDF
Use the PDF engine’s exact CSS and browser version for testing. Print preview and headless PDF generation may use different defaults, fonts, margins, or fragmentation code paths.
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.
The PDF overflows or leaves a large blank area
The engine may be relaxing avoidance or reserving space for a group that cannot fit. Reduce header height, remove broad table-level avoidance, or simplify the print header before forcing page breaks.
Practical decision guide
| Situation | First action | What to verify |
|---|---|---|
| Simple two-row header | Semantic <thead> plus both break properties |
Header repeats and remains intact in the target PDF engine |
| Complex rowspan or tall labels | Measure and reduce header height | One-quarter-page repetition condition and correct span matrix |
| Chrome/Puppeteer still fragments it | Inspect computed print styles, then simplify markup | Exact browser version and production PDF settings |
| Every table must begin on a fresh page | Use a targeted break-before: page |
Acceptable whitespace and document flow |
Frequently Asked Questions
Does page-break-inside: avoid guarantee an unbroken rowspan header?
No. It is a legacy alias for break avoidance, and CSS fragmentation rules can be relaxed when required to fit content. Renderer behavior for complex rowspans must be checked in the generated PDF.
Should I apply break-inside: avoid to every table row?
Usually no. Apply it to the header group and its header rows; applying it to a long body can remove necessary page breakpoints and cause overflow or excessive whitespace.
Recommended Free Tools
Can JavaScript calculate a safe page break?
It can be made engine-specific, but the available standards and case evidence do not establish a portable JavaScript solution. Prefer semantic markup, print CSS, and renderer-specific verification first.
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.

