Recommended Free Tools
Use Playwright Java to capture the page as a byte[], then upload those bytes with the AWS SDK for Java 2.x S3Client.putObject. This avoids a temporary file when you do not need a local copy. If you do want an artifact for debugging or retention, save the screenshot to a path and upload that file instead.
What you need
- Java 8 or newer and a deployment environment that meets Playwright Java’s current browser system requirements. Playwright launches browsers headlessly by default. See Playwright’s installation guide.
- The Playwright Java dependency and browser installation appropriate for your build. Follow the current Playwright installation instructions for your operating system and chosen browser.
- AWS SDK for Java 2.x S3 dependency, an S3 bucket, and AWS credentials configured for the environment. The identity needs permission to put objects in the destination bucket.
- A bucket name, AWS region, page URL, and object key. Use a unique key if each run should preserve its screenshot; reuse a key only when replacing the existing object is intended.
Capture a page and upload the image bytes
This complete example captures the full scrollable page as PNG bytes, then writes them to S3 with an explicit content type. Supply your own bucket, key, URL, region, and AWS configuration. The APIs shown are documented by Playwright and the AWS SDK for Java 2.x S3 upload guide; this combined example is an implementation pattern, not a reported test result.
import com.microsoft.playwright.Browser;
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Playwright;
import com.microsoft.playwright.options.LoadState;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.model.PutObjectRequest;
import software.amazon.awssdk.core.sync.RequestBody;
public class ScreenshotToS3 {
public static void main(String[] args) {
String pageUrl = "https://example.com";
String bucketName = "your-bucket";
String objectKey = "screenshots/example.png";
try (Playwright playwright = Playwright.create();
S3Client s3 = S3Client.builder()
.region(Region.US_EAST_1) // Set this to the bucket's region.
.build()) {
Browser browser = playwright.chromium().launch();
try {
Page page = browser.newPage();
page.navigate(pageUrl);
page.waitForLoadState(LoadState.NETWORKIDLE);
byte[] screenshot = page.screenshot(
new Page.ScreenshotOptions().setFullPage(true));
PutObjectRequest request = PutObjectRequest.builder()
.bucket(bucketName)
.key(objectKey)
.contentType("image/png")
.build();
s3.putObject(request, RequestBody.fromBytes(screenshot));
} finally {
browser.close();
}
}
}
}
Configure the AWS SDK’s normal credential provider chain for the runtime rather than putting access keys in source code. Change Region.US_EAST_1 to the bucket’s actual region. The object key is the path-like name stored in S3; it does not create a local file.
Wait for the right page state
The example waits for NETWORKIDLE after navigation, but that is not right for every site: pages with analytics, polling, or long-lived connections may never become network-idle. Choose a condition tied to what you need to capture, such as waiting for a specific selector with Playwright’s locator or page waiting APIs, or using a deliberate short delay when the page has no reliable readiness signal. Do not treat navigation completion alone as proof that client-rendered content, fonts, or images are ready.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →#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.
Viewport versus full-page capture
Without setFullPage(true), the screenshot covers the current viewport. Use the full-page option when the deliverable should include the page’s full scrollable document. Playwright also supports clipping a region; consult the Java screenshot documentation for the exact options and behavior.
Choose bytes or a local file
| Route | Best fit | Trade-off |
|---|---|---|
Screenshot bytes, then putObject |
Small or moderate images when the application does not need a local artifact. | The image occupies process memory; the byte-backed request body is straightforward. |
| Screenshot to a path, then upload the file | A file-based pipeline, local debugging, or retention of a local copy. | Requires filesystem space and decisions about naming, lifecycle, and cleanup. |
This is an API-based trade-off, not a speed benchmark. Pick based on your memory limits and whether a local artifact is useful.
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.
Save to a path and upload that file
Set a path in the screenshot options to make Playwright write the capture locally. The image type can be inferred from the extension when saving. Then use the AWS SDK’s file-backed request body:
import java.nio.file.Path;
import java.nio.file.Paths;
import software.amazon.awssdk.core.sync.RequestBody;
import software.amazon.awssdk.services.s3.model.PutObjectRequest;
Path screenshotPath = Paths.get("build/screenshots/example.png");
page.screenshot(new Page.ScreenshotOptions()
.setPath(screenshotPath)
.setFullPage(true));
s3Client.putObject(
PutObjectRequest.builder()
.bucket(bucketName)
.key(objectKey)
.contentType("image/png")
.build(),
RequestBody.fromFile(screenshotPath));
Ensure the parent directory exists before capture, and delete the local file afterward if it is only a temporary artifact. AWS’s Java S3 object examples document file upload patterns: Performing Operations on Amazon S3 Objects.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.
Set the capture format and visual behavior
Playwright’s screenshot options cover format and rendering controls. The selected format should match the declared S3 contentType and, for path output, the filename extension.
- PNG: a lossless option suited to text-heavy captures and visual inspection; it can produce larger objects.
- JPEG or WebP: use when smaller image output matters and lossy compression is acceptable. The screenshot options expose quality controls for JPEG and WebP.
- Scale: choose CSS-pixel or device-pixel scaling according to the consumer’s needs; device-pixel output can increase dimensions and storage.
- Clipping and masks: capture a region or mask dynamic/sensitive elements when that better fits the task.
- Animation and stylesheets: screenshot options include animation handling and stylesheet-related controls that can help make a capture more repeatable.
See the Playwright Java screenshot guide and Page API reference for supported option names. A screenshot is a rendering of a browser environment, not a guarantee of identical pixels across machines. For repeatable output, control the browser version, fonts, viewport, device scale, locale, and page state.
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
Upload streams with a known length
If the image is represented as an InputStream rather than a byte array or file, use the matching synchronous RequestBody factory and supply the exact content length when known. AWS specifically documents RequestBody.fromInputStream(inputStream, contentLength) and advises providing the correct length: Uploading streams to Amazon S3 using the AWS SDK for Java 2.x. Do not guess the length. If you already hold the screenshot in a byte array, RequestBody.fromBytes(screenshot) avoids that ambiguity.
Performance, reliability, and cost considerations
- Memory: the returned screenshot byte array is held in memory through the upload. Large full-page captures or high device scale can raise peak memory use; use file-backed output or manage concurrency if that becomes a constraint.
- Browser lifecycle: reuse a browser process for a controlled batch when appropriate, but close pages and browsers deliberately. A browser per capture simplifies isolation but adds launch overhead. Measure in your own environment rather than assuming a performance difference.
- Navigation reliability: websites may fail, redirect, require authentication, or render at different speeds. Set an application-appropriate timeout and capture only after a meaningful page condition.
- S3 failures: distinguish browser/capture failures from AWS authorization, region, network, and throttling errors. Retry transient upload failures according to the workload, while avoiding duplicate object keys if each run must be preserved.
- Storage and requests: S3 storage and request charges depend on your AWS account, region, usage, and current pricing. Choose object retention and key conventions accordingly; this article does not assign a universal cost.
Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| Browser launch fails in a container or CI job | The host is missing browser system dependencies or the installed Playwright browser does not match the runtime setup. | Follow the current Playwright installation and system requirements for that operating system; verify the browser installation step in the same image used by the job. |
| The screenshot is only the visible portion of the page | The default capture is the viewport. | Set setFullPage(true), or use clipping when only a specific region is needed. |
| The page is captured before content appears | Navigation returned before the relevant client-rendered content or assets were ready. | Wait for a page-specific selector or state. Avoid relying blindly on network idle on pages with continuous network activity. |
putObject reports access denied |
The configured AWS identity lacks permission for the target operation or bucket policy denies it. | Check the runtime identity, bucket name, object key, and bucket policy; grant only the needed write access. |
| Upload fails with a region or endpoint error | The configured SDK region does not match the bucket’s region or environment settings conflict. | Set the S3 client region to the bucket’s region and verify the active AWS configuration. |
| The object opens with an unexpected type or browser behavior | The declared content type does not match the encoded screenshot. | Keep the extension, screenshot format, and S3 contentType aligned, for example PNG with image/png. |
| A stream upload has length-related issues | The request body was created with an incorrect or unknown length. | Use the exact byte length with the stream request-body factory, or upload the known byte array with RequestBody.fromBytes. |
Or skip the browser setup
ScreenshotNeo is a screenshot API and MCP server. Its one-call API returns an image or PDF, so it can replace the browser-capture portion when you do not need to run Playwright yourself. See the API documentation for parameters and response behavior.
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 -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server gives AI agents tools for screenshots, page information, and PDF capture. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Create a free ScreenshotNeo account.
Frequently Asked Questions
Can I upload the screenshot to S3 without writing it to disk?
Yes. Call `Page.screenshot()` without setting a path and pass the returned `byte[]` to `RequestBody.fromBytes`.
Does Playwright Java capture the whole page by default?
No. The default is the current viewport; use `setFullPage(true)` for the full scrollable page.
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.

