For a true full-page capture in a Chrome extension, attach to the tab with chrome.debugger and send the Chrome DevTools Protocol command Page.captureScreenshot with captureBeyondViewport: true. The extension needs the debugger permission. If that permission is unsuitable or blocked by policy, capture viewport-sized sections with chrome.tabs.captureVisibleTab() and stitch them together; a single call to that API captures only the visible area.
Why one visible-tab screenshot is not full-page
chrome.tabs.captureVisibleTab() captures the tab’s visible area, not the document extending below the viewport. Google’s official sample demonstrates capturing the visible area and wiring up an action button; it is a useful starting point for a viewport screenshot, but it is not a full-page capture implementation. See the Chrome extension screenshot API documentation and the GoogleChrome extensions samples.
There are two practical approaches: use the debugger API to request a beyond-viewport screenshot in one CDP operation, or build a scroll-and-stitch workflow from multiple visible-area captures. The first is more direct but requires a powerful permission and may be restricted; the second avoids debugger access but adds rendering, quota, and image-composition concerns.
Method 1: Capture the page with chrome.debugger and CDP
1. Declare the permission
Add debugger to the extension’s manifest permissions. For a Manifest V3 extension that also exposes an action, a minimal manifest might look like this:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →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.
{
"manifest_version": 3,
"name": "Full Page Capture",
"version": "1.0.0",
"permissions": ["debugger", "activeTab"],
"action": {
"default_title": "Capture full page"
},
"background": {
"service_worker": "service-worker.js",
"type": "module"
}
}
The activeTab permission is included here for the user-invoked action pattern; the CDP attachment itself requires debugger. Chrome explicitly requires that permission to use chrome.debugger. Review the Chrome debugger API documentation before shipping, especially because debugger access can be more intrusive than a basic screenshot permission.
2. Attach to the tab and request a screenshot
The following service-worker handler accepts an action click, attaches to the active tab, sends the CDP command, and returns the PNG data URL through the console. It detaches even if capture fails:
chrome.action.onClicked.addListener(async (tab) => {
if (!tab.id) return;
const target = { tabId: tab.id };
let attached = false;
try {
// "1.3" is a CDP protocol version string. Use a version supported
// by the Chrome releases you target.
await chrome.debugger.attach(target, "1.3");
attached = true;
const result = await chrome.debugger.sendCommand(
target,
"Page.captureScreenshot",
{
format: "png",
captureBeyondViewport: true
}
);
if (!result || typeof result.data !== "string") {
throw new Error("Chrome returned no screenshot data.");
}
const dataUrl = `data:image/png;base64,${result.data}`;
console.log("Full-page screenshot data URL:", dataUrl);
// Replace this with your extension's UI or download flow.
} catch (error) {
console.error("Full-page screenshot failed:", error);
// Surface a useful error in the extension UI instead of failing silently.
} finally {
if (attached) {
try {
await chrome.debugger.detach(target);
} catch (detachError) {
console.warn("Could not detach debugger cleanly:", detachError);
}
}
}
});
The CDP option captureBeyondViewport is documented as capturing “the screenshot beyond the viewport.” Consult the Chrome DevTools Protocol Page.captureScreenshot reference for the command and its parameters. The code requests PNG because it is lossless and convenient for page captures; CDP also exposes image-format options, so choose the format your workflow needs.
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. Display or save the returned image
The CDP response’s data field is base64-encoded image data. For a production extension, avoid putting a very large data URL in logs. Pass it to an extension page, render it in an <img>, or convert it to a Blob and trigger a download. Keep the UI responsive for exceptionally tall pages, and handle failed captures visibly rather than assuming every target can be captured.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
When the debugger approach is appropriate
- Use it when a single beyond-viewport capture is the simplest reliable fit and users can knowingly grant debugger access.
- Do not assume it will work in managed environments: enterprise host restrictions, Chrome’s
DisableScreenshotspolicy, or DLP controls may prevent debugger attachment or screenshot capture. - Choose the CDP protocol version with the Chrome versions you support in mind; the protocol version string in the example is not a guarantee that every future or managed release accepts it unchanged.
Method 2: Scroll, capture, and stitch
If your extension should avoid the debugger permission, an alternative is to measure the page, scroll through it, capture each visible region, and composite the images. This is an engineering pattern built from the visible-area behavior of captureVisibleTab(); Chrome’s API reference does not provide a universal full-page stitching algorithm.
Plan the page measurements
Use a content script to read the document’s scroll height and width, viewport dimensions, current scroll position, and device-pixel ratio. The extension needs a way to inject or run that script, such as scripting with suitable host access or a user-granted activeTab flow. Account for zoom and device-pixel ratio when converting CSS-pixel measurements into screenshot-image pixels; otherwise the final canvas can be undersized, oversized, or misaligned.
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.
Capture overlapping viewport strips
- Save the page’s original scroll position and measure its dimensions.
- Choose a sequence of vertical scroll positions that covers the full document. Use a small overlap between captures so rounding or scroll clamping does not leave gaps.
- At each position, scroll the page, wait for layout and painting to settle, and call
chrome.tabs.captureVisibleTab()for the active tab. - Decode each image, crop away duplicated overlap, and draw the remaining strip onto a canvas in document order.
- Crop the final image to the measured document bounds, then restore the page’s original scroll position and any temporary page changes.
Chrome documents MAX_CAPTURE_VISIBLE_TAB_CALLS_PER_SECOND as 2 from Chrome 92 onward. Throttle calls to stay within that limit; do not start captures in a tight loop and assume the API will accept them all. The current API reference is the authority for the capture method and quota: chrome.tabs.captureVisibleTab().
Prevent common seams and missing content
- Sticky and fixed elements: repeated navigation bars can appear in every strip. Temporarily hide or alter them during capture if appropriate, then restore their original styles and state.
- Lazy-loaded images: scrolling can trigger content to load, so wait after each scroll and verify that the page height has stabilized before finalizing the capture.
- Changing pages: animations, feeds, ads, and live content can move between captures. Consider pausing animations or explaining that the result is a stitched sequence rather than a single instant in time.
- Cross-origin frames: content scripts cannot freely inspect every embedded frame. Treat inaccessible content as a boundary rather than promising that every frame will be represented identically.
- Very tall pages: large canvases and decoded images consume memory. Capture in chunks, avoid retaining unnecessary image copies, and consider imposing a documented maximum height.
Which approach should you choose?
| Decision point | Debugger plus CDP | Scroll and stitch |
|---|---|---|
| Output model | One beyond-viewport CDP screenshot command | Multiple visible-area screenshots composited in the extension |
| Permissions | Requires the debugger permission |
Uses visible-tab capture plus script injection or host/active-tab access |
| Main trade-off | More direct, but debugger attachment can be restricted by enterprise or screenshot policies | Avoids debugger access but must handle quota, seams, lazy loading, and page changes |
| Good fit | Controlled environments and extensions whose use case justifies debugger access | Extensions that minimize debugger privilege or need page-aware preprocessing |
Permission and policy considerations
The debugger route has a distinct permission cost: users and administrators may regard it differently from a narrow capture action. Explain why the extension requests it and when it is used. In managed Chrome deployments, an administrator’s policy may restrict attachment, screenshots, or both. A failed attach is not necessarily a defect in the capture parameters; provide a clear error and, where suitable, offer the scroll-and-stitch route as an alternative.
For either route, use the least access that supports the intended workflow. A user-triggered action can help scope access, but do not assume that activeTab overrides enterprise policy or grants debugger access by itself.
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
Troubleshooting full-page captures
Only the visible viewport appears
Cause: the extension called captureVisibleTab() once, or the CDP command did not receive captureBeyondViewport: true.
Fix: use the debugger/CDP method with the beyond-viewport option, or capture multiple scroll positions and stitch them.
chrome.debugger.attach() fails
Cause: the extension lacks the manifest debugger permission, the selected tab is unavailable, or Chrome/enterprise policy blocks debugger access.
Fix: verify the manifest and tab ID, handle the rejected promise, and check managed-device restrictions. If debugger access cannot be used, implement the visible-area fallback.
The screenshot is blank or incomplete
Cause: the page may not have finished rendering, lazy-loaded elements may not yet be present, or a policy/DLP restriction may interfere with capture.
Fix: wait for page content to settle, trigger lazy loading through scrolling when using the fallback, and report policy-related failures instead of silently returning a blank image.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →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.
Scroll-and-stitch output has lines, duplicated headers, or gaps
Cause: inconsistent scroll offsets, image scaling, fixed elements, or insufficient overlap can misalign strips.
Fix: measure in CSS pixels and reconcile with device-pixel ratio, use overlap, crop duplicated regions deliberately, and test with sticky headers and zoom changes.
Capture calls are rejected or throttled
Cause: the fallback exceeds the documented visible-tab capture quota.
Fix: pace calls at no more than the documented 2-per-second maximum for Chrome 92 onward, and allow time for each image to decode before issuing the next capture.
Or skip the browser setup
If you need a screenshot from application code rather than a Chrome extension, ScreenshotNeo offers a website screenshot API and MCP server. A single GET request returns an image or PDF, with options for full-page captures and other capture controls. For example, save a PNG of a page 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
See the ScreenshotNeo API documentation for request parameters. Cookie banners and consent prompts, newsletter popups, and chat widgets are removed before the shot; failed loads, blank pages, bot checks, and cache hits are not billed. Its MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Free tools Windows power users keep installed
One-click scans. No signup required.
Frequently Asked Questions
Can a Manifest V3 extension use Chrome DevTools Protocol for a full-page screenshot?
Yes. An extension can attach with chrome.debugger and issue Page.captureScreenshot with captureBeyondViewport: true, provided the manifest declares debugger and policy permits the operation.
Does Google’s Chrome extension screenshot sample capture an entire page?
No. It demonstrates capturing the visible area of the current tab with chrome.tabs.captureVisibleTab(), not full-page capture.
Can a screenshot include content inside cross-origin frames?
Do not assume so with a scroll-and-stitch implementation. Cross-origin frame access and the page’s rendering behavior can limit what an extension can inspect or reproduce.
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.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errors

