Recommended Free Tools
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Use a wkhtmltopdf user stylesheet to hide the specific cookie-banner elements before rendering. Inspect the page to find its overlay and dialog selectors, place those selectors in a CSS file, then pass that file with --user-style-sheet. If the banner is injected by JavaScript, diagnose with --disable-javascript or remove it with page-specific code passed to --run-script, using --javascript-delay when the page needs time to settle. These controls change the screenshot or PDF presentation; they do not prove that the site recorded consent.
1. Identify how the banner appears
Cookie interfaces differ by site. A banner may be present in the initial HTML, added after page load by JavaScript, or accompanied by a full-screen backdrop, fixed footer, modal dialog, newsletter prompt, or chat widget. There is no universal selector documented by wkhtmltopdf. Inspect the actual page in a normal browser, identify every element that obscures content, and record selectors that are as narrow and stable as possible.
- Open the page, right-click the banner, and choose Inspect.
- Look for an outer overlay, the dialog itself, and any backdrop or scroll-lock element.
- Prefer an ID or distinctive component attribute over a generic class such as
.container. - Check whether the page still has a reserved bottom margin or a disabled scrollbar after the visible elements are hidden.
Re-check selectors when the site changes its consent provider or markup. A stylesheet is tied to the page implementation, not to the concept of “cookie banner.”
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
2. Hide the banner with --user-style-sheet
The official wkhtmltopdf references document --user-style-sheet as a stylesheet loaded with every page. Create a local file containing only the rules needed for the target page.
/* remove-banner.css */
#cookie-banner,
.cookie-consent-overlay,
.cookie-consent-backdrop {
display: none !important;
}
/* Restore scrolling only if the page locks it while the dialog is open. */
html.cookie-lock,
body.cookie-lock {
overflow: auto !important;
}
Replace those example selectors with the selectors you found. Do not copy them unchanged and assume they will work elsewhere.
Render a PDF
wkhtmltopdf --user-style-sheet /absolute/path/remove-banner.css https://example.com page.pdf
Render an image
wkhtmltoimage --user-style-sheet /absolute/path/remove-banner.css https://example.com page.png
Use an absolute file path when running from automation or a service account. After rendering, open the output and verify that the banner, backdrop, page spacing, and scrolling state are correct. The option applies CSS to the rendered page; it does not modify the source site or save a consent choice.
3. When JavaScript creates the banner
If the banner is absent when scripts are disabled but appears during a normal load, JavaScript is involved. Treat disabling scripts as a diagnostic first because it can also remove navigation, images, charts, authentication flows, and other content.
Diagnostic render with JavaScript disabled
wkhtmltopdf --disable-javascript https://example.com no-js.pdf
Compare this file with a normal render. If the page remains complete and the banner is gone, disabling JavaScript may be acceptable for this particular URL. It is not a general solution for JavaScript-heavy sites.
Remove known elements after load with --run-script
wkhtmltopdf documents --run-script for additional JavaScript after page load. Supply code that targets the actual banner and any backdrop. The code below is an example; change the selectors for your page.
wkhtmltopdf
--run-script "(function(){['#cookie-banner','.cookie-consent-overlay','.cookie-consent-backdrop'].forEach(function(s){document.querySelectorAll(s).forEach(function(e){e.remove();});});document.documentElement.style.overflow='auto';document.body.style.overflow='auto';})();"
--javascript-delay 1000
https://example.com page.pdf
Keep the script narrowly scoped. Removing a broad class or every fixed-position element can destroy legitimate navigation and notices. If the provider inserts the banner later than the page’s load event, increase the delay or use a script that waits for the element, then test at the same timing used in production. A delay controls when printing occurs; waiting longer by itself does not remove a persistent banner.
Use a JavaScript file for maintainability
// remove-banner.js
(function () {
var selectors = [
'#cookie-banner',
'.cookie-consent-overlay',
'.cookie-consent-backdrop'
];
selectors.forEach(function (selector) {
document.querySelectorAll(selector).forEach(function (element) {
element.remove();
});
});
document.documentElement.style.overflow = 'auto';
document.body.style.overflow = 'auto';
}());
Pass the contents according to the command-line syntax supported by your installed build, or keep the logic in a wrapper that constructs the --run-script argument. Confirm the exact option behavior with the installed version’s help output and the official references.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →4. Choosing the least destructive method
| Situation | First choice | Why | Risk to review |
|---|---|---|---|
| Banner is in the page markup or has stable selectors | --user-style-sheet |
Changes only the rendered presentation and is easy to audit | Selectors can break after a redesign |
| Banner appears only with scripts, but the page works without them | --disable-javascript |
Quick diagnostic and simple command | Other JavaScript content may disappear |
| Page needs JavaScript | --run-script plus a suitable delay |
Removes only known elements after load | Timing and selectors are site-specific |
| Banner arrives late | Targeted script and --javascript-delay |
Allows the provider to finish inserting UI | Longer renders and still no guarantee of removal |
The settings reference distinguishes web-page settings from loading settings. Option availability and behavior can vary with the wkhtmltopdf build, so test the binary you deploy rather than relying on a different machine’s package.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
5. A repeatable validation checklist
- Render the URL without overrides and save a baseline.
- Inspect the page and list the banner, backdrop, and any scroll-lock selectors.
- Apply the smallest possible stylesheet rule.
- Render at the production viewport, paper size, orientation, and URL.
- Check the top, bottom, and full-page output for clipped content or blank space.
- Compare text, images, menus, and interactive content with the baseline.
- If the banner remains, determine whether a different selector, later insertion, iframe, or shadow DOM is involved.
- Record the URL, selectors, wkhtmltopdf build, delay, and output settings so a future site change is diagnosable.
For a page inside an iframe, a stylesheet applied to the top document may not affect the frame’s document. You may need a rule that the renderer can apply to that frame, or a page-specific script that reaches it when same-origin rules permit. Cross-origin frames may remain outside your control. Shadow-DOM components likewise may not respond to ordinary document selectors; test the output rather than assuming a matching class is enough.
6. Troubleshooting common failures
The banner is still visible
- Wrong selector: inspect the live element, including its parent backdrop, and update the CSS.
- Late insertion: use
--run-scriptafter load and a measured--javascript-delay. - Iframe or shadow DOM: determine whether the element belongs to a separate document or encapsulated tree.
- CSS precedence: add
!importantto the targeteddisplayrule, but avoid broad global overrides.
The page is blank or incomplete
First remove --disable-javascript; many sites require scripts for their main content. Then test a targeted stylesheet or script instead. A blank result can also reflect a page load failure, unsupported site behavior, authentication, or a renderer limitation rather than the banner itself.
The page content is shifted upward or clipped
Hiding a fixed banner does not necessarily remove padding, a spacer, or a body class that the site added. Inspect computed styles and remove only the corresponding spacer or restore overflow when it was locked. Validate long pages, not only the first viewport.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →The script runs too early
Increase --javascript-delay modestly and target the element after it exists. Excessive delays increase render time without fixing a selector or cross-origin problem.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
The command works locally but fails in automation
Use absolute paths, ensure the service account can read the CSS file, and verify that the deployed binary supports the options. Capture stderr and retain the output and command settings for comparison.
7. Reliability, maintenance, and consent boundaries
These techniques are presentation controls for a PDF or image. Hiding a dialog does not click “Accept,” write a cookie, alter a consent-management platform’s state, or establish that tracking is permitted. If your compliance process requires consent, implement that process separately and document it.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Keep selectors in version-controlled files, add a visual regression check for important URLs, and review them whenever the site changes its consent provider. Prefer one page-specific rule over a global rule that hides every fixed element. Test with and without JavaScript, at the actual render delay, and with the same wkhtmltopdf build used by your job runner.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. It accepts the consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers.
One GET request returns PNG, JPEG, WebP, or PDF. See the ScreenshotNeo documentation for all options, including full-page lazy-image loading, CSS-selector element capture, device and retina settings, custom CSS or JavaScript, waits, request blocking, cookies and headers, geolocation, resizing, caching, signed links, asynchronous webhooks, bulk capture, and the usage API.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
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)
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 for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
8. Official references
- wkhtmltopdf page and loading settings
- wkhtmltopdf command-line usage
- wkhtmltopdf PDF C bindings settings
Frequently Asked Questions
Does hiding a cookie banner accept cookies?
No. A user stylesheet or removal script changes the rendered PDF or image only; it does not establish a consent choice.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Is there one CSS selector that removes every cookie banner?
No. Selectors are specific to the site’s markup and consent provider, so inspect each target page.
Should I always disable JavaScript?
No. Use it as a diagnostic or only when the page still renders correctly without scripts; otherwise prefer targeted CSS or post-load JavaScript.
Quick Recap
Why does a longer JavaScript delay not fix the banner?
The delay changes render timing. It cannot correct a wrong selector, an iframe or shadow-DOM boundary, or a banner that remains present by design.
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.

