Free tools Windows power users keep installed
One-click scans. No signup required.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
In PhantomJS, create a webpage, set its viewport, wait for page.open to succeed, and call page.render(). Leave clipRect unset for the whole page, set it to capture a rectangle, and use renderBase64() when the image needs to stay in memory. PhantomJS’s documented controls also include zoomFactor for output scale. The right combination depends on whether you need a predictable layout, a crop, a file, or an encoded image.
Start with a successful page load
PhantomJS uses WebKit as its page-rendering engine. Its documented screenshot workflow is to create a webpage, open a URL, and render after the open callback reports success. The callback matters: attempting to render after a failed load can give you an empty or unintended result rather than the requested page.
var page = require('webpage').create();
page.open('https://example.com/', function (status) {
if (status === 'success') {
page.render('example.png');
}
phantom.exit();
});
Change the URL and output filename for your job. The documentation describes rendering HTML styled with CSS as well as SVG, images, and canvas. It lists PNG, JPEG, GIF, and PDF as page.render() output formats. A screenshot is only as useful as the page state it captures, so treat successful navigation as the first gate, not proof that every later visual update has finished.
Set the viewport before opening the page
page.viewportSize sets the viewport dimensions used for layout. Specify both width and height before calling page.open so the page is laid out for the intended window size.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
var page = require('webpage').create();
page.viewportSize = {
width: 1280,
height: 900
};
page.open('https://example.com/', function (status) {
if (status === 'success') {
page.render('example.png');
}
phantom.exit();
});
The viewport determines the layout context: a narrower width may trigger a different responsive design, while a different height changes the visible window area. Include both values when reproducing a target layout. Do not use zoomFactor as a substitute for selecting the viewport; it controls render scale, not the page’s intended layout dimensions.
Wait for the state you intend to capture
The PhantomJS viewport example uses a 200-millisecond delay after a successful open before rendering. That is an example, not a universal guarantee that a page is ready. A site may continue updating after the navigation callback, so choose a readiness condition appropriate to the page and use a delay only when it addresses a known late update.
page.open('https://example.com/', function (status) {
if (status !== 'success') {
console.log('Unable to load the address');
phantom.exit();
return;
}
window.setTimeout(function () {
page.render('example.png');
phantom.exit();
}, 200);
});
If the capture misses content, first determine whether navigation succeeded and whether the page had reached the desired visual state at render time. Increasing a delay can help a page that updates shortly after load, but a fixed wait cannot establish that every asynchronous page is ready. Keep the delay tied to the page’s behavior rather than assuming the same interval works everywhere.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Capture a full page or a specific rectangle
Whole-page output
With no clipping rectangle set, page.render() processes the whole page. This is the direct choice when you need a full-page image or document rather than a viewport-sized crop. Make sure the page has reached the intended state before rendering.
Rectangle crop
Set page.clipRect to an object containing top, left, width, and height to define the rasterized region. For example, this captures an 800-by-600 rectangle starting at the top-left:
page.clipRect = {
top: 0,
left: 0,
width: 800,
height: 600
};
page.render('cropped.png');
The documented clipping example uses a 400-by-300 rectangle beginning at left 3 and top 14. Use the coordinates and dimensions that correspond to the region you need; a clip rectangle is a rectangular crop, not a selector for a particular DOM element. For a stable card, chart, component, or viewport-sized image, choose a rectangle deliberately and keep its dimensions consistent between runs.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Choose the output format and delivery method
Save an image or PDF
The documented page.render() formats are PNG, JPEG, GIF, and PDF. As a practical choice, PNG suits text, interface details, and line art; JPEG can suit photographic content when a smaller file is preferable; and PDF is appropriate when the deliverable should be a document rather than a bitmap. These are use-case recommendations, not a claim that one format is best for every page.
Recommended Free Tools
Keep the image in memory as Base64
Use page.renderBase64(format) when the next stage needs an encoded image string instead of a file written by page.render(). The documented formats for this method are PNG, GIF, and JPEG; PDF is not listed for Base64 output.
var page = require('webpage').create();
page.viewportSize = { width: 1920, height: 1080 };
page.open('https://example.com/', function (status) {
if (status === 'success') {
var encoded = page.renderBase64('PNG');
// Pass encoded to the next step in your pipeline.
}
phantom.exit();
});
The variable encoded holds the returned Base64-encoded image buffer. The example requests PNG; substitute a documented Base64 format when another image type fits your pipeline. If the consumer expects a file, use page.render() instead of adding an unnecessary encode-and-decode step.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Control output scale with zoomFactor
page.zoomFactor controls scaling for both page.render() and page.renderBase64(). Its documented default is 1, or 100 percent. Set a value such as 0.25 for a thumbnail preview, or use another scale appropriate to the output you need.
var page = require('webpage').create();
page.viewportSize = { width: 1280, height: 900 };
page.zoomFactor = 1.5;
page.open('https://example.com/', function (status) {
if (status === 'success') {
page.render('scaled.png');
}
phantom.exit();
});
Keep viewport and scale decisions separate: viewport dimensions drive page layout, while zoom changes render scale. When comparing output, hold the URL, viewport, and page readiness state constant and change one control at a time. That makes it easier to tell whether a difference came from responsive layout or from output scaling.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Combine the controls in one script
This example sets a 1280-by-900 viewport, uses the default scale explicitly, checks the open status, waits for the documented example interval, clips to a viewport-sized rectangle, and writes a PNG.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
var page = require('webpage').create();
page.viewportSize = { width: 1280, height: 900 };
page.zoomFactor = 1;
page.open('https://example.com/', function (status) {
if (status !== 'success') {
console.log('Unable to load the address');
phantom.exit();
return;
}
window.setTimeout(function () {
page.clipRect = { top: 0, left: 0, width: 1280, height: 900 };
page.render('example.png');
phantom.exit();
}, 200);
});
Remove clipRect if you need the whole page rather than that defined rectangle. Adjust the viewport, scale, filename, and wait to match the page and deliverable; the example’s delay is not a readiness guarantee for arbitrary sites.
Troubleshoot the result
- The output is missing or the page is blank: Check the
statuspassed to thepage.opencallback. Render only aftersuccess, and handle failure without treating it as a valid screenshot. - The layout does not match the expected page: Set both
viewportSize.widthandviewportSize.heightbefore opening the URL. The viewport controls layout, so a different width can produce a different responsive design. - Content appears late or is absent: The page may still be updating after the open callback. The documented viewport example waits 200 milliseconds, but choose a delay or readiness condition suited to the target instead of assuming that interval always works.
- The capture is cropped unexpectedly: Inspect all four
clipRectvalues. Its top and left offsets determine the origin, and its width and height determine the selected rectangle. Remove the clip rectangle for whole-page rendering. - The image looks too small or large: Check
zoomFactorindependently from the viewport. Its default is1; changing it affects render scale, while the viewport affects layout. - The pipeline needs a string, not a file: Use
renderBase64()and one of its documented image formats. Usepage.render()when the target is a saved output file or PDF. - The requested Base64 PDF is unavailable: The documented Base64 formats are PNG, GIF, and JPEG. Use
page.render()for documented PDF output.
When a local PhantomJS script is not the right fit
A local page.render() script is the direct documented option when you want to control a render from code. If your workflow instead needs a hosted screenshot API or a way for an AI agent to request captures, consider ScreenshotNeo. Its stated differentiators include accepting cookie/consent banners like a visitor and removing more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. It also reports whether a page was a bot check, blank, timed out, failed to load, or a cache hit, and says only clean shots are billed. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. Those are service features, not PhantomJS settings.
Or skip the browser setup
ScreenshotNeo offers a one-request capture API. The following cURL call uses Stripe as the target example; replace the URL with the page you need and supply your API key.
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 details. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots per month with no card, and paid plans start at $5 for 3,000 shots. Sign up for the free plan.
Frequently Asked Questions
Can PhantomJS return a screenshot without writing it to disk?
Yes. Use `page.renderBase64()` to get a Base64-encoded PNG, GIF, or JPEG image.
Does a clip rectangle select an HTML element?
No. `clipRect` specifies a rectangular raster region using top, left, width, and height coordinates.
What is PhantomJS’s default zoom factor?
The documented default is `1`, equivalent to 100 percent.
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 & 11Quick 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.

