Use Playwright for .NET and set FullPage = true on Page.ScreenshotAsync. That captures the page’s entire scrollable document, not only the visible viewport, and can save a PNG, JPEG, or WebP file or return the image as bytes.
What “full page” means in Playwright
Playwright defines a full-page screenshot as an image of the complete scrollable page, as if a very tall screen could display the entire document. The option is disabled by default, so an ordinary screenshot captures only the current viewport.
The essential call is:
await page.ScreenshotAsync(new PageScreenshotOptions
{
Path = "full-page.png",
FullPage = true
});
Path writes the result to disk. If you omit it, ScreenshotAsync returns a byte array that you can send to storage, an image processor, a test comparison tool, or an HTTP response.
Prerequisites and project setup
- The .NET SDK installed and a C# console, worker, test, or web project.
- The
Microsoft.PlaywrightNuGet package. - A Playwright browser installation (Chromium, Firefox, or WebKit) matching the package version you use.
Add the package from your project directory:
dotnet add package Microsoft.Playwright
After the package is restored, build the project and run the generated Playwright installer for your environment. Keep the browser version aligned with the package and verify the current installation command in the Playwright .NET documentation for the version pinned in your project. Live documentation can change, so do not assume a command from a different package release is still valid.
Recommended Free Tools
#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.
Complete C# example
This console-style program launches Chromium, opens a URL, and saves a full-page PNG.
using Microsoft.Playwright;
using var playwright = await Playwright.CreateAsync();
await using var browser = await playwright.Chromium.LaunchAsync();
var page = await browser.NewPageAsync();
await page.GotoAsync("https://example.com");
await page.ScreenshotAsync(new PageScreenshotOptions
{
Path = "full-page.png",
FullPage = true
});
Console.WriteLine("Saved full-page.png");
Use a top-level statement project with a recent C# version, or place the same operations in an async method. In a long-running service, create and reuse a browser process where practical, then create an isolated page or browser context for each job.
Reusable method for an existing page
using Microsoft.Playwright;
static async Task CaptureFullPageAsync(IPage page, string outputPath)
{
await page.ScreenshotAsync(new PageScreenshotOptions
{
Path = outputPath,
FullPage = true
});
}
This method assumes navigation and any page preparation have already completed.
Capture bytes instead of creating a file
byte[] image = await page.ScreenshotAsync(new PageScreenshotOptions
{
FullPage = true,
Type = ScreenshotType.Png
});
await File.WriteAllBytesAsync("full-page.png", image);
Returning bytes is useful when a test stores artifacts in object storage or an ASP.NET endpoint returns the image directly. Do not set a filesystem path if your caller needs the byte array.
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.
Image format, size, and repeatability controls
| Option | What it does | Important detail |
|---|---|---|
Type |
Selects PNG, JPEG, or WebP. | PNG is the default. When saving by path, the filename extension can determine the format. JPEG and WebP support quality settings; PNG does not use a quality value. |
Quality |
Controls lossy JPEG or WebP compression. | Use it only with JPEG or WebP. It has no effect for PNG. |
Scale |
Controls output pixel density. | Css produces approximately one output pixel per CSS pixel. Device uses device pixels and can create a substantially larger image on a high-DPI context. |
FullPage |
Expands the capture to the document’s full scrollable height. | It is independent of viewport width and does not guarantee that every lazy-loaded resource has loaded. |
Clip |
Captures only a specified rectangle. | Use this for a region; it is not a substitute for a full-page capture. |
Animations |
Controls CSS animations and transitions during capture. | Playwright can fast-forward finite animations and cancel infinite ones for the screenshot, then restore page state. |
Caret |
Controls the text caret. | Hide suppresses it; Initial leaves the page’s normal behavior unchanged. |
Style |
Injects a stylesheet for a deterministic capture. | The stylesheet can hide volatile elements and applies through Shadow DOM and inner frames. |
Timeout |
Sets the screenshot operation timeout. | The current API reference documents 30,000 ms as the default; confirm the value for your installed package. |
A repeatable capture often combines a fixed viewport, a consistent color scheme, disabled animations, a hidden caret, and a stylesheet that removes timestamps or rotating banners. These controls stabilize rendering; they do not turn a changing application into static content.
Prepare the page before capturing
Navigate explicitly and wait for the state your screenshot represents. For example, wait for a known selector after an application renders:
await page.GotoAsync("https://example.com/catalog");
await page.Locator("main").WaitForAsync();
await page.ScreenshotAsync(new PageScreenshotOptions
{
Path = "catalog.png",
FullPage = true,
Animations = ScreenshotAnimations.Disabled,
Caret = ScreenshotCaret.Hide,
Scale = ScreenshotScale.Css
});
A full-page flag changes the capture area, not the application’s loading behavior. Pages that load images only when elements approach the viewport may still contain missing images if they have not been triggered. If your application exposes a “load more” control, click it and wait for the resulting content before the screenshot. If it uses infinite scrolling, define a stopping condition and scroll in your own code rather than assuming FullPage will discover every item.
For visual tests, a custom stylesheet can hide unstable areas:
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsawait page.ScreenshotAsync(new PageScreenshotOptions
{
Path = "stable.png",
FullPage = true,
Style = "[data-live-clock], .random-ad { visibility: hidden !important; }"
});
Handling long pages and large files
- Use
Scale = Csswhen pixel dimensions and memory use matter more than device-pixel sharpness. - Prefer PNG for lossless test comparison and text-heavy documentation; use JPEG or WebP when smaller files are acceptable.
- Set an explicit viewport width so responsive breakpoints do not change between runs.
- Very tall documents can consume considerable memory. Capture a specific element or clipped region when a complete document is not required.
- Store screenshots outside the repository’s source tree when they are generated artifacts, and clean up temporary files after uploads.
Playwright returns only after it has produced the image or the operation fails. For batch jobs, catch exceptions per URL, record the address and error, and continue with the remaining work instead of losing the entire batch.
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.
Troubleshooting common failures
The image contains only the viewport
Ensure the options object includes FullPage = true. A normal ScreenshotAsync call, or a Selenium screenshot call, does not automatically mean “entire document.”
The screenshot times out
Slow pages, blocked resources, or a page that never settles can exceed the screenshot timeout. Wait for a concrete selector rather than an indefinitely busy network, increase the screenshot timeout for a known slow page, and inspect navigation errors separately. Keep a finite timeout so a failed URL cannot stall a worker forever.
Images or sections are blank
Check that the page reached the intended state before capture. Trigger application-controlled lazy loading, wait for the relevant image or content locator, and verify that authentication, cookies, and required headers are present. FullPage alone does not promise that off-screen JavaScript has run.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Output is unexpectedly huge
Switch from Device to Css, reduce the viewport width only if that matches your requirement, or use JPEG/WebP with an appropriate quality value. Do not reduce scale when the screenshot is intended for a high-resolution device-pixel artifact.
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
Dynamic elements make every capture differ
Disable animations, hide the caret, inject a stylesheet for clocks or ads, and capture at a fixed viewport and color scheme. Also control test data and authentication state; screenshot options cannot freeze server-generated content.
JPEG quality appears ignored
Quality is relevant to JPEG and WebP. PNG is lossless and does not use the quality option.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Selenium and Chrome DevTools alternatives
ScreenshotNeo is the first alternative to try when you want an API rather than browser setup: it produces clean shots, bills only clean captures, and its paid plan starts at $5.
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 →Clear out junk files and repair common Windows errorsFree Scan →| Approach | What the documented API provides | Scope and trade-off |
|---|---|---|
| Playwright .NET | Direct FullPage = true, file or byte output, format, scale, animation, caret, clipping, stylesheet, and timeout controls. |
The clearest cross-browser .NET implementation for this task. |
| ScreenshotNeo | HTTP screenshot API and MCP server, with full-page capture and many page controls. | Hosted service; no local browser lifecycle to maintain. |
Selenium .NET Screenshot |
Represents an image of the currently loaded page and can save a PNG with SaveAsFile. |
The cited class reference does not document a full-scrollable-page option, so do not treat its basic method as equivalent to Playwright’s FullPage. |
| Chrome DevTools Protocol | Page.captureScreenshot includes a captureBeyondViewport parameter; Playwright .NET exposes CDPSession for raw protocol commands. |
Chromium-specific and lower-level. The protocol reference does not provide a complete C# recipe guaranteeing an arbitrarily long document capture. |
For reproducibility, match your code to the exact Playwright package and browser versions. The DevTools “tip-of-tree” protocol reference can differ from a stable Chrome release, and the Selenium API page does not identify a package version in its title.
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.
Or skip the browser setup
ScreenshotNeo accepts one GET request and returns a PNG, JPEG, WebP, or PDF. Its capture pipeline accepts cookie and consent banners like a visitor, then removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and whether the request was billed. It also offers an MCP server for Claude, Cursor, and other MCP clients, with take_screenshot, get_page_info, and capture_pdf tools.
See the ScreenshotNeo API documentation for the current parameters. A full-page request can be made with cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The same request in 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)
And in 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}`);
Every feature is available on every plan. The 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 get an API key.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
FAQ
Does a full-page screenshot include the browser’s address bar or tabs?
No. Playwright captures the web page rendered inside the browser context, not the operating-system window, browser chrome, or desktop.
Can I use the same C# code for PDF output?
No. A screenshot call creates an image. Use Playwright’s PDF API for a PDF document in a Chromium context, or use ScreenshotNeo’s PDF endpoint when a hosted capture is more suitable.
Is FullPage guaranteed to capture an endlessly growing feed?
No. It captures the document height that exists when the screenshot is taken. An infinite feed must be driven to a defined stopping point and verified before capture.
Frequently Asked Questions
Does a full-page screenshot include the browser’s address bar or tabs?
No. It captures the rendered web page, not browser chrome or the desktop.
Can I use the same C# call to create a PDF?
No. Use the browser’s PDF API or a dedicated PDF capture service.
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.

