The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →If table borders appear in Chromium but disappear from a Puppeteer PDF, check the print cascade first. page.pdf() uses the print CSS media type by default, and a collapsed-table edge is removed when any competing declaration uses border-style: hidden. Add an explicit visible border in print CSS, inspect computed styles with print media active, and only then adjust PDF options or line widths.
Why borders visible in the browser vanish in the PDF
Puppeteer renders a PDF as print output. The Page.pdf() API generates the document with the print CSS media type, so rules inside @media screen, screen-only stylesheets, or styles that are overridden by @media print may not apply. A table can therefore look correct in a normal browser tab while its printable version has no cell borders.
There is a second, less obvious cause: collapsed-border conflict resolution. With border-collapse: collapse, the line between two cells is a shared edge. Borders declared on the table, row groups, rows, columns, and both neighboring cells compete for that edge. CSS 2.1 gives hidden special priority: any border with that value suppresses every competing border at the location. none is different; it has the lowest priority and can lose to a visible neighboring border.
That means a visible border: 1px solid on a td can still disappear if a more specific rule on the table, row, or adjacent cell contributes border-right: hidden (or the shorthand border: hidden) to the same edge.
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 →#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.
Fastest reliable fix
Start with an explicit print rule that sets style, width, and color together:
@media print {
table {
border-collapse: collapse;
}
th,
td {
border: 1px solid #333;
}
}
The solid style is important. Setting only a width or color does not revive a border whose style remains none or hidden. If your design intentionally uses separated cells, use this instead:
@media print {
table {
border-collapse: separate;
border-spacing: 0.25rem;
}
th,
td {
border: 1px solid #333;
}
}
Choose one model deliberately. Collapsed borders produce a continuous grid and require conflict resolution. Separated borders keep each cell’s box independent and add configurable space between boxes.
Diagnose the document before changing Puppeteer options
1. Reproduce the print cascade in DevTools
- Open the page in Chromium and inspect a cell that should have a line.
- In the Styles pane, enable the
printmedia simulation (the exact DevTools label can vary by Chromium release). - Look for rules that reset borders, selectors that apply only to screen media, and declarations such as
border: hidden,border-left: hidden, orborder-right: hidden. - Check the Computed pane for
border-top-style,border-right-style,border-bottom-style, andborder-left-style, along with their widths and colors.
Do this with print media active. Looking only at the normal screen cascade can hide the rule that Puppeteer actually uses.
Free tools Windows power users keep installed
One-click scans. No signup required.
2. Inspect every structure that can contribute an edge
For a collapsed table, inspect the table, thead, tbody, tfoot, tr, th, and td rules. Also inspect generated inline styles and CSS-in-JS output. Search all loaded stylesheets for:
border: hiddenborder-top: hidden,border-right: hidden,border-bottom: hidden, orborder-left: hidden- print selectors that are more specific than your normal table rule
- rules that set
border-style: noneafter a visible shorthand
Remove an unintended hidden declaration or override it with a more specific print rule. If the border is supposed to show, state the visible style explicitly rather than relying on inheritance.
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.
3. Verify computed styles from Puppeteer itself
The following script switches to print media, waits for the page to finish loading, and reports the computed border values for a selected cell. Replace the URL and selector with your own document:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com/report', {
waitUntil: 'networkidle0'
});
const styles = await page.$eval('table th, table td', element => {
const s = getComputedStyle(element);
return {
borderTopStyle: s.borderTopStyle,
borderTopWidth: s.borderTopWidth,
borderTopColor: s.borderTopColor,
borderRightStyle: s.borderRightStyle,
borderRightWidth: s.borderRightWidth,
borderBottomStyle: s.borderBottomStyle,
borderBottomWidth: s.borderBottomWidth,
borderLeftStyle: s.borderLeftStyle,
borderLeftWidth: s.borderLeftWidth,
tableBorderCollapse: getComputedStyle(element.closest('table')).borderCollapse
};
});
console.log(styles);
await browser.close();
})();
If the reported style is hidden, find the declaration that won the cascade. If it is none or the width is 0px, add an explicit print rule. A visible computed style does not guarantee a dark line in every viewer, but it confirms that CSS is no longer suppressing the edge.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Make Puppeteer use the intended media type
Use print CSS for a printable document
Print CSS is usually the correct solution for a PDF: hide navigation, control page breaks, set paper-specific spacing, and define borders that are meant to print. Call page.pdf() normally after your print rules and content are ready.
Use screen CSS only when the PDF must match the screen
If the requirement is a screen-faithful capture rather than a print layout, switch media before generating the PDF:
await page.emulateMediaType('screen');
await page.pdf({
path: 'screen-styled.pdf',
printBackground: true,
format: 'A4'
});
This makes screen rules active, but it also means print-only page sizing, visibility, and pagination rules will not be used. It is a deliberate trade-off, not a general border fix.
A complete PDF script with a print border baseline
This example injects a small print stylesheet, waits for fonts and application content, and writes a PDF. Prefer a stylesheet in your application for production; addStyleTag is useful for proving whether the cascade is the problem.
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.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
headless: true
});
try {
const page = await browser.newPage();
await page.goto('https://example.com/report', {
waitUntil: 'networkidle0'
});
await page.addStyleTag({
content: `
@media print {
table { border-collapse: collapse; }
th, td {
border: 1px solid #333 !important;
border-style: solid !important;
}
}
`
});
await page.evaluate(async () => {
if (document.fonts) await document.fonts.ready;
});
// Replace this with the condition your application uses after data rendering.
await page.waitForSelector('table');
await page.pdf({
path: 'report.pdf',
format: 'A4',
printBackground: true,
preferCSSPageSize: true,
margin: {
top: '16mm',
right: '16mm',
bottom: '16mm',
left: '16mm'
}
});
} finally {
await browser.close();
}
})();
Use !important only as a diagnostic or where you intentionally need to override a component library. A precise selector in your print stylesheet is easier to maintain.
PDF options that affect how a border looks
printBackground
The documented default is false. Set printBackground: true when your table effect depends on background fills or background images. It does not create a missing border and cannot override a border suppressed by hidden.
-webkit-print-color-adjust
-webkit-print-color-adjust: exact requests more faithful color output for print. It can help a gray line retain its intended contrast, but color adjustment cannot reinstate a border whose computed style is none or hidden.
@media print {
* {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
preferCSSPageSize, width, and scaling
preferCSSPageSize: true tells Puppeteer to give CSS @page size priority over API paper settings. When it is false, Puppeteer may scale the layout to the selected paper size. That scaling can make a very thin line appear faint, so check page sizing when the CSS is correct but the output looks lighter than expected.
Recommended Free Tools
Line width and viewer zoom
After confirming a visible computed border, inspect the PDF at normal size and high zoom in the viewer used by your readers. A subpixel or very thin line can be hard to see against a white page. Test a practical print width such as 1px or 0.5pt rather than trying to repair a structural CSS problem with color settings.
Collapsed-border rules that commonly surprise developers
| Declaration or model | Effect at a shared edge | Typical action |
|---|---|---|
border-style: hidden |
Suppresses all competing borders at that location. | Remove it or override it with an intentional visible style. |
border-style: none |
Lowest-priority border style; a visible neighbor can still win. | Check which neighboring declaration supplies the final edge. |
border-collapse: collapse |
Adjacent cells share one edge and participate in conflict resolution. | Inspect both cells and table structures. |
border-collapse: separate |
Cells retain separate borders, with spacing controlled by border-spacing. |
Use when independent boxes are preferable to a seamless grid. |
Wait for the page that will actually be printed
A correct stylesheet cannot help if the PDF is captured before the table exists. networkidle0 waits for network activity to settle, but client-side rendering may continue afterward. Wait for your application’s own ready signal, such as a report container, a row count, or a custom flag.
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
await page.goto(url, { waitUntil: 'networkidle0' });
await page.waitForSelector('[data-report-ready="true"]');
await page.evaluate(async () => {
if (document.fonts) await document.fonts.ready;
});
await page.pdf({ path: 'report.pdf' });
Puppeteer’s guide says fonts are awaited by default during PDF generation, but application data, injected CSS, and asynchronous components remain your responsibility.
Troubleshooting: symptom, cause, and fix
| Symptom | Likely cause | Fix |
|---|---|---|
| All borders disappear only in the PDF. | The border exists only in screen CSS or is reset by a print rule. | Inspect with print media active and define th, td { border: 1px solid ... } in @media print. |
| One edge is missing while the others show. | A table, row, or neighboring cell contributes hidden on that shared edge. |
Inspect every contributor and remove or override the hidden side. |
Computed style says none. |
A shorthand or more specific selector reset the style. | Set a visible style explicitly; width and color alone are insufficient. |
| Computed style is visible, but the line looks absent. | The line is too thin, scaled, low contrast, or viewed at a zoom level where it falls between pixels. | Test a sturdier width, verify paper scaling, and inspect the PDF in the target viewer. |
| Background shading is missing too. | printBackground remains at its default of false. |
Set printBackground: true; this affects backgrounds, not border generation. |
| The table is missing or incomplete. | PDF capture occurred before asynchronous data or CSS finished. | Wait for a render-ready selector or application signal, then wait for fonts. |
| Screen styling is required but print styling is active. | Puppeteer is using the documented print media default. | Call page.emulateMediaType('screen') before page.pdf(). |
About an old thin-border bug report
A July 2019 issue involving Puppeteer 1.8.0 and Chrome 73 reported sub-1px discrepancies. It was unconfirmed and does not establish behavior in current Puppeteer releases. Treat it as a clue only after you have verified the computed print styles and ruled out hidden, missing print rules, and page scaling.
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 reinstallOr skip the browser setup
If your goal is a clean image or PDF of a URL rather than maintaining Puppeteer infrastructure, ScreenshotNeo provides a single-request screenshot API and an MCP server for AI clients. It accepts consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those cleanup steps can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. The MCP tools are take_screenshot, get_page_info, and capture_pdf.
For a direct call, see the ScreenshotNeo API documentation:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
It also supports full-page captures with lazy images loaded, CSS-selector element capture, dark mode, device presets and arbitrary viewports, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, click-before-capture actions, selector hiding, selector or network-idle waits, request and resource blocking, custom headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Parameter names used by other screenshot APIs are accepted to ease migration.
Every feature is available on every plan: Free includes 1,000 shots per month with no card, Starter is $5 for 3,000, Growth $15 for 15,000, Pro $39 for 60,000, Scale $99 for 250,000, and Business $249 for 1,000,000; annual billing gives two months free. If you want to avoid browser setup, sign up for the free plan.
FAQ
Does changing to border-collapse: separate guarantee visible lines?
No. It avoids collapsed-edge conflict resolution, but a print rule can still set the cell border to none or hidden. Define the intended border explicitly in the print cascade.
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.
Should I rely on a PDF editor to draw the missing lines afterward?
Use a PDF editor only as a last-resort post-processing step. Fixing the HTML and print CSS keeps the output repeatable when data, page count, or table dimensions change.
Can a cache hit explain a missing border?
A browser cache can preserve an older stylesheet, so invalidate or version assets while debugging. A cache hit in ScreenshotNeo is reported and is not billed, but it does not change Puppeteer’s CSS cascade.
Frequently Asked Questions
Does changing to border-collapse: separate guarantee visible lines?
No. It avoids collapsed-edge conflict resolution, but a print rule can still set the cell border to none or hidden. Define the intended border explicitly in the print cascade.
Should I rely on a PDF editor to draw the missing lines afterward?
Use a PDF editor only as a last-resort post-processing step. Fixing the HTML and print CSS keeps the output repeatable when data, page count, or table dimensions change.
Can a cache hit explain a missing border?
A browser cache can preserve an older stylesheet, so invalidate or version assets while debugging. A cache hit in ScreenshotNeo is reported and is not billed, but it does not change Puppeteer’s CSS cascade.
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.

