What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use one Playwright browser and BrowserContext, create a separate Page for each URL, and run a bounded number of capture tasks concurrently. Save every result to a unique, sanitized path, wait for a site-specific readiness condition, and close each Page in a finally block. Add setFullPage(true) when you need the entire scrollable document rather than the current viewport.
What the bulk architecture looks like
Playwright’s official Pages guide states that each BrowserContext can have multiple pages. That makes a context a practical unit for a batch: launch one browser process, create one context with shared settings, and open a Page per URL. A fixed-size executor limits how many pages navigate and render at once.
- Browser: the Chromium, Firefox or WebKit process.
- BrowserContext: an isolated session containing cookies, headers, viewport and multiple pages.
- Page: one tab and one screenshot job.
- Executor: the concurrency limit protecting CPU, memory, network and the target sites.
Do not use the URL itself as a filename. Query strings, slashes and Unicode can create invalid or colliding paths. Assign a stable job index or ID, append a sanitized slug, and retain the original URL in your job log.
Complete Java example
The following program captures three full-page PNG files with three workers. It creates the output directory, waits for the load state, writes deterministic names, and closes each page even when navigation or capture fails.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →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.
import com.microsoft.playwright.*;
import java.nio.file.*;
import java.util.*;
import java.util.concurrent.*;
public class BulkScreenshots {
public static void main(String[] args) throws Exception {
List<String> urls = List.of(
"https://example.com/one",
"https://example.com/two",
"https://example.com/three");
Path outputDir = Paths.get("screenshots");
Files.createDirectories(outputDir);
try (Playwright pw = Playwright.create()) {
Browser browser = pw.chromium().launch();
BrowserContext context = browser.newContext(
new Browser.NewContextOptions().setViewportSize(1440, 900));
ExecutorService pool = Executors.newFixedThreadPool(3);
List<Future<?>> jobs = new ArrayList<>();
for (int i = 0; i < urls.size(); i++) {
final int index = i;
jobs.add(pool.submit(() -> {
Page page = context.newPage();
try {
page.navigate(urls.get(index));
page.waitForLoadState();
Path path = outputDir.resolve(String.format("%03d.png", index));
page.screenshot(new Page.ScreenshotOptions()
.setPath(path)
.setFullPage(true)
.setScale(ScreenshotScale.CSS));
} finally {
page.close();
}
}));
}
for (Future<?> job : jobs) job.get();
pool.shutdown();
context.close();
browser.close();
}
}
}
Use the Java Playwright dependency and install the browser binaries before running the class. The example uses ScreenshotScale.CSS, so one output pixel represents one CSS pixel. Replace it with ScreenshotScale.DEVICE when high-DPI device pixels are required; files will generally be larger.
Make the batch safe for production
Use collision-resistant paths
A production name can combine a zero-padded index, a slug and a short job ID, for example 004-pricing-a91f2c.webp. Normalize characters to letters, numbers, underscores or hyphens; cap the length; and reserve the extension for the selected format. Never allow user-provided path segments to escape the output directory.
Bound concurrency
A pool of three is only an example, not a throughput promise. More pages increase parallel network requests, Java heap use, browser renderer processes and target-site load. Start with a small pool, observe CPU, memory, navigation time and failure rate, then adjust. No official Playwright source publishes a universal screenshots-per-second benchmark.
Capture failures independently
Wrap each job in its own exception handling, record the URL and exception type, and continue other jobs. Retry transient navigation failures with a finite attempt count and backoff. Do not retry a deterministic 404 indefinitely. A useful result record contains job ID, URL, start and finish times, output path, HTTP status when available, and error text.
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 →Close resources in the right order
Close every Page in finally. After all futures complete, shut down the executor, close the context, and close the browser. If the process is interrupted, cancel outstanding futures and restore the interrupt flag before cleanup.
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.
Choose the screenshot you actually need
Viewport or full page
Without options, page.screenshot captures the current viewport. setFullPage(true) captures the complete scrollable document, as if it were displayed on a screen tall enough to contain the page. Full-page rendering can take longer and consume more memory on very long pages.
Element-only captures
For a component, use a locator rather than the discouraged ElementHandle screenshot API:
Locator card = page.locator("article.product-card").first();
card.screenshot(new Locator.ScreenshotOptions()
.setPath(outputDir.resolve("product-card.png"))
.setAnimations(ScreenshotAnimations.DISABLED));
Require a unique or intentionally first match. If the locator resolves to nothing, treat that URL as a failed job and report the selector.
PNG, JPEG and WebP
PNG is the default and preserves lossless detail, making it suitable for text and visual regression. JPEG is smaller for photographic pages and supports a quality setting, but introduces compression artifacts. WebP is also supported by the Java API and can reduce transfer and storage size when your downstream system accepts it. Set the corresponding path extension and screenshot format options together.
CSS versus device scale
CSS produces predictable dimensions tied to the viewport’s CSS pixels. DEVICE follows device pixels and is useful for high-DPI deliverables, but increases byte size and processing cost. Keep the scale consistent within a comparison set.
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.
Wait for a stable page
waitForLoadState() only tells you that the selected load state occurred; it does not guarantee that client-side data, fonts or lazy images are ready. Prefer a condition that represents your page:
- Wait for a known result selector, such as
[data-page-ready]. - Wait for a network response that supplies the rendered data.
- Use a short, explicit delay only when the site has no observable readiness signal.
- For lazy images, scroll or otherwise trigger loading before a full-page capture.
Set a deliberate timeout rather than relying on an unlimited wait. Pages with ads, analytics or never-ending connections may otherwise hold a worker forever.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesImprove visual repeatability
Dynamic content can make two captures differ even when your code is unchanged. Disable CSS animations and transitions where supported, mask timestamps, rotating ads or user-specific widgets, and inject a stylesheet that hides unstable regions. Set a fixed viewport, timezone, locale and color scheme when those values affect layout. Use a consistent user agent and authenticated context if the page requires a login.
When post-processing is needed, omit setPath; the screenshot method returns bytes that you can hash, upload, resize or store in an object service. Writing directly to a path is simpler and avoids holding every image in memory.
Common failures and fixes
Browser executable missing
Symptom: launch fails before the first URL. Fix: install the Playwright-managed browser binaries for the Java package in the same environment that runs the job, and verify the cache path used by your deployment user.
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
Navigation timeout
Symptom: one future throws while others continue. Fix: increase the per-page timeout only when the site is known to be slow; otherwise capture the failure, retry transient errors, and check DNS, TLS, redirects and authentication.
Free tools Windows power users keep installed
One-click scans. No signup required.
Blank or incomplete screenshot
Symptom: the file exists but content is missing. Fix: wait for the application’s ready selector, wait for fonts or data, trigger lazy loading, and check whether a bot challenge or consent dialog is covering the page.
Files overwrite each other
Symptom: only one image remains. Fix: generate names from immutable job IDs, not the last URL path segment alone, and include an extension that matches the format.
Out-of-memory or host saturation
Symptom: renderer crashes, long pauses or operating-system kills. Fix: lower pool size, avoid retaining screenshot byte arrays, process URLs in chunks, and use a fresh context or browser only when isolation requires it.
Flaky visual comparisons
Symptom: pixels change between identical runs. Fix: freeze animations, mask dynamic locators, inject deterministic CSS, fix viewport and device scale, and wait for a meaningful readiness condition.
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 matchPC 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 & 11Best 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.
When a hosted service is a better fit
Local Playwright gives you control, but operating browsers, concurrency, retries, proxies, storage and cross-browser capacity becomes work at larger scale. A hosted screenshot API can move that infrastructure out of your batch worker. Evaluate fidelity, output formats, latency, authentication controls, failure semantics and cost for your workload rather than assuming a published throughput number.
Or skip the browser setup
ScreenshotNeo is the first alternative to try when you want a hosted screenshot API: it removes cookie banners, popups and chat widgets before capture, bills only clean shots, and has a free plan with the lowest paid tier starting at $5.
One GET request returns an image or PDF. See the parameter reference in the ScreenshotNeo 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}`);
ScreenshotNeo supports full-page and element captures, dark mode, device presets or custom viewports, retina scale, PNG/JPEG/WebP, PDF settings, custom CSS and JavaScript, clicks, waits, resource blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, selectable-TTL caching, signed links, asynchronous jobs with signed webhooks, bulk capture of 100 URLs per call, a usage API and an OpenAPI specification. Its MCP server provides take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients.
Bot checks, blank pages, timeouts, failed loads and cache hits cost nothing, and response headers identify the page verdict and whether the request was billed. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for the free plan.
Frequently Asked Questions
Can one BrowserContext be shared by all worker threads?
Yes, a context can contain multiple pages; keep each Page confined to one job and avoid mutating shared context settings while captures are running.
Should every URL get a new browser process?
Usually no. Reuse one browser and context, creating and closing pages per URL; isolate contexts only when cookies, permissions or storage must not be shared.
Does full-page mode include content loaded only after scrolling?
Not automatically in every application. Trigger lazy loading or wait for the page’s own completion signal before calling the full-page screenshot.
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.

