Symfony Panther does not document takeScreenshot() as a guaranteed full-page capture method. For a quick attempt, you can measure the document, resize the browser window, and call Panther’s screenshot method—but that community-reported workaround can change responsive layouts and is not guaranteed to work on every page. If you need capture beyond the viewport in Chrome, the Chrome DevTools Protocol offers a separate, browser-specific method.
What Panther’s screenshot method captures
Panther is a PHP library for scraping websites and running end-to-end tests in real browsers. Its project README describes it as “a convenient standalone library to scrape websites and to run end-to-end tests using real browsers.” Panther exposes takeScreenshot(), which delegates screenshot capture to the WebDriver instance. The documented call alone does not guarantee an image of the page’s entire scrollable height.
Panther supports Chrome and Firefox clients, and can drive local or remote browsers through WebDriver. The browser and matching driver must be available in your environment. Check the Panther project README for current Composer and browser-driver setup instructions; those requirements can change.
Try the window-resize workaround
A Panther issue reports a workaround: read the document’s scroll dimensions, resize the browser window to those dimensions, then take the ordinary WebDriver screenshot. The issue author cautions that it may not work in every case, so treat it as an experiment to validate against your browser and pages—not as a Panther full-page API.
#1 Best Overall
Runnable PHP example
After installing Panther and its browser prerequisites, save this as a PHP script and run it from the project directory:
<?php
require __DIR__.'/vendor/autoload.php';
use FacebookWebDriverWebDriverDimension;
use SymfonyComponentPantherClient;
$client = Client::createChromeClient();
$client->request('GET', 'https://example.com');
$width = $client->executeScript('return document.documentElement.scrollWidth');
$height = $client->executeScript('return document.documentElement.scrollHeight');
$client->manage()->window()->setSize(new WebDriverDimension($width, $height));
$client->takeScreenshot('screenshot.png');
The example follows the approach described in the Panther issue about full-page screenshots. It measures the document element, not a guarantee of every visually relevant pixel. Resizing can trigger a different responsive breakpoint, and the issue does not establish that arbitrary page heights or widths will work.
Rank #2
Wait for rendered content before measuring
Panther’s README documents waiting for page elements when a page needs time to render. If the target content is inserted asynchronously, wait for the relevant element before measuring dimensions. Lazy-loaded content can require scrolling or other page-specific interaction to load; the issue does not provide a universal lazy-load solution. Validate that the expected content is present before saving the screenshot.
Use Chrome DevTools Protocol for beyond-viewport capture
Chrome’s DevTools Protocol has a Page.captureScreenshot method with a captureBeyondViewport option. Its documented default is false; enabling it allows capture beyond the viewport. This is Chrome protocol functionality, not evidence of a built-in, cross-browser Panther full-page convenience method.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The protocol method also accepts an optional clip region and supports PNG, JPEG, or WebP output. Integrating it means using the Chrome DevTools Protocol route rather than relying only on Panther’s ordinary WebDriver screenshot call. Check the Chrome DevTools Protocol Page reference for the method’s parameters and current protocol details.
Choose the approach that fits the job
| Approach | Scope and confidence | Trade-offs |
|---|---|---|
Measure dimensions, resize the window, call Panther takeScreenshot() |
Community-reported workaround; reliability is not guaranteed by its author. | Uses familiar Panther/WebDriver calls, but resizing can change layout. Test very tall pages and dynamic content in your target browser. |
Chrome DevTools Protocol Page.captureScreenshot with captureBeyondViewport: true |
Documented Chrome protocol option; not established as a built-in Panther method. | Chrome-specific integration; offers clipping and output-format options. Check protocol compatibility for your setup. |
The available documentation does not establish a numeric maximum screenshot size that applies across browsers. For unusually large pages, verify output dimensions and memory use in your own environment rather than assuming either route can capture an unlimited page.
Rank #4
Troubleshoot common failures
- The screenshot contains only the visible viewport:
takeScreenshot()is the ordinary WebDriver screenshot call, not a documented guarantee of full-page capture. Try the resize workaround or, for Chrome, the DevTools Protocol route. - The captured layout differs from the page: Changing window dimensions may activate a different responsive layout. Compare the result with the original viewport and consider the Chrome protocol approach if preserving the viewport layout matters.
- Content is missing: The page may not have finished rendering or may load content as you scroll. Wait for the relevant element using Panther’s documented waiting patterns, then confirm the content exists before measuring and capturing.
- Browser or driver startup fails: Verify that your selected browser and compatible driver are installed and available to Panther. Use the project README’s current setup guidance for your environment.
- The Chrome protocol method is unavailable or behaves differently: It is Chrome-specific, and protocol details can vary by browser version. Confirm that your integration uses the correct protocol method and parameters for the Chrome version in use.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. A single request can return an image or PDF; it removes supported cookie banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, and failed loads are not billed, and an MCP server lets AI agents take screenshots.
For example, this cURL request captures a page as WebP. See the ScreenshotNeo documentation for the API options and response details.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo to get 1,000 free screenshots a month with no card.
Frequently Asked Questions
Can Panther capture beyond the viewport in Firefox?
The cited beyond-viewport option is part of Chrome DevTools Protocol. The documented Panther screenshot call and the reported resize workaround do not establish an equivalent guaranteed full-page method for Firefox.
Does resizing the Panther window guarantee the complete page?
No. The workaround is community-reported, and its author says it may not work in every case. Test it with the actual browser and pages you need to capture.
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.

