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 →In Puppeteer, wait for the page’s real content to appear, then wait for used fonts and the images you need to finish loading and decoding before calling page.screenshot(). A navigation event such as load or networkidle2 is useful, but neither proves that a dynamic page, lazy-loaded images, and fonts are ready for your particular capture.
A reliable Puppeteer capture sequence
Install Puppeteer for your project, then save this as an ES module such as screenshot.mjs. Run it with node screenshot.mjs https://example.com. Replace the example URL and, if possible, replace #main-content with a selector that identifies the content your application has finished rendering.
As an Amazon Associate I earn from qualifying purchases.
import puppeteer from 'puppeteer';
const url = process.argv[2];
if (!url) throw new Error('Usage: node screenshot.mjs <url>');
const browser = await puppeteer.launch({ headless: true });
try {
const page = await browser.newPage();
page.setDefaultTimeout(15000);
await page.setViewport({ width: 1440, height: 900 });
await page.goto(url, {
waitUntil: 'networkidle2',
timeout: 30000
});
await page.waitForSelector('#main-content');
// For a full-page capture, scroll to prompt nearby lazy images to load.
await page.evaluate(async () => {
const step = Math.max(1, window.innerHeight);
for (let y = 0; y < document.body.scrollHeight; y += step) {
window.scrollTo(0, y);
await new Promise(resolve => setTimeout(resolve, 100));
}
window.scrollTo(0, 0);
});
await page.evaluate(async () => {
await document.fonts.ready;
const images = [...document.images];
await Promise.all(images.map(async image => {
if (!image.currentSrc && !image.src) return;
if (!image.complete) {
await new Promise(resolve => {
image.addEventListener('load', resolve, { once: true });
image.addEventListener('error', resolve, { once: true });
});
}
if (image.complete && image.naturalWidth > 0 && image.decode) {
await image.decode().catch(() => {});
}
}));
});
await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
await browser.close();
}
This is a starting pattern, not a universal drop-in guarantee. It waits for a target element, the document’s used fonts, and image readiness, then captures. For a viewport-only screenshot of eagerly loaded images, omit the scroll loop and use fullPage: false. If the page inserts or replaces images after these waits, add an application-specific ready condition or recheck the relevant elements immediately before capturing.
Decide what counts as an image failure
The example waits for each image’s load or error event, then attempts decoding only when the image completed successfully and has a nonzero naturalWidth. It ignores decode rejection so one broken image does not abort the screenshot. If a missing image makes the capture unusable, change that policy: detect images with naturalWidth === 0 after the wait and throw an error or report their URLs instead of silently continuing.
#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
Why navigation completion is not screenshot readiness
page.goto() can wait for a navigation lifecycle event, but that event is not the same as the application displaying every element in its final state. Puppeteer’s navigation wait options include load, while its screenshot guidance demonstrates networkidle2; the Page API also provides selector and page-function waits for conditions specific to the page. See Puppeteer’s screenshot guide, WaitForOptions, and the Page API.
| Readiness signal | Useful for | What it does not establish |
|---|---|---|
waitUntil: 'load' |
Basic navigation completion. | That application-specific rendering is done, or that deferred lazy images are visible and ready. |
waitUntil: 'networkidle2' |
Pages that settle after their initial activity; it is also used in Puppeteer’s screenshot example. | That later hydration, polling, animation, or DOM changes will not affect the screenshot. Persistent background traffic can also prevent idleness. |
waitForSelector() or waitForFunction() |
A known element or explicit application-ready marker. | Anything beyond the condition you chose; the marker must genuinely represent the desired state. |
document.fonts.ready |
Waiting for used fonts and associated layout work to settle. | That every declared font loaded; unused and some optional fonts may remain unloaded. |
Image completion plus naturalWidth and decode() |
Checking individual image fetch success and decoded availability. | That lazy images have been requested, or that later application changes will not replace them. |
| Fixed sleep | A simple upper-bound pause when nothing better is available. | That any particular resource or application state is ready. |
Use a selector or function wait for application readiness, then add font and image waits. Treat network idle as a useful milestone, not a guarantee that every page is settled.
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
Wait for fonts that affect the capture
await document.fonts.ready resolves when the document’s used fonts have finished loading and the associated layout operations are complete. It is the relevant browser-level wait when the screenshot shows fallback typography even though the page appears to have loaded. It does not force fonts that the page never uses to load. See MDN’s Document.fonts reference and FontFaceSet.ready.
Call it after the content that uses those fonts exists. If your app changes text, styles, or font faces later, wait for that app-specific update before capturing; a font wait cannot predict future changes.
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.
Wait for images, including lazy-loaded content
An image’s complete property alone is not a success check: it can be true for a failed image or an element with no source. Check for a usable source, then use naturalWidth to distinguish successful loading from failure; call decode() when available to wait until image data is ready for use. The promise can reject, so decide whether to ignore, report, or fail on that condition. See MDN’s complete property reference and decode().
Images marked for lazy loading may not be fetched until they approach the viewport. A page’s load event therefore does not guarantee that below-the-fold images are ready for a full-page screenshot. Scroll through the areas that matter before checking those images. Lazy-loading behavior is described in the MDN <img> reference and HTMLImageElement.loading.
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
Full-page versus viewport captures
Viewport-only
If all required images are in the viewport and load eagerly, you can skip the scroll loop. Wait for the content and fonts, then check and decode the images in the relevant region. For a long page, scope the checks to that region rather than delaying the capture for every image in the document.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Full page
Scroll through the areas to be captured so lazy images have an opportunity to load, return to the top if that is the desired starting position, and then wait for the relevant image loads and decoding. The sample uses fullPage: true. Sites may continue changing because of animation, polling, hydration, or later DOM updates, so define a page-specific point at which the content is considered final.
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.
Chrome Headless command-line screenshots
Chrome Headless supports command-line screenshots with --screenshot and viewport sizing with --window-size. Its --timeout is a maximum delay before capture, not proof that fonts, images, or application content have finished loading. Use the Chrome Headless overview and CLI reference for command-line options. For robust state-based waits, scripted Puppeteer gives you selector, function, font, and image checks before the screenshot.
Common failures and fixes
- Fallback font in the image: Wait for the content that uses the font to render, then await
document.fonts.ready. If the page changes font styles afterward, wait for that later state too. - Blank or missing image: Do not treat
completeas proof of success. ChecknaturalWidth, calldecode()for successful images, and handle decode failures according to whether a broken image is acceptable. - Images missing only in full-page captures: Trigger lazy loading by scrolling through the relevant content before checking images. The page’s load event may precede a lazy image request.
networkidle2never arrives: Background requests may keep the page active. Use a meaningful app-ready selector orwaitForFunction()instead of relying on network quiet alone.- Screenshot still catches changing content: Add a page-specific readiness condition for hydration or data updates. Network idle and font readiness do not stop animations, polling, or future DOM mutations.
- Capture happens too early with a CLI timeout: A timeout only caps the delay; it does not verify success. Use Puppeteer when you need a failure path tied to readiness checks.
- The script waits indefinitely: Set bounded navigation and selector timeouts, as in the example, and decide what the script should do on timeout: fail the job, log the page state, or take a diagnostic capture.
Or skip the browser setup
ScreenshotNeo can return a screenshot or PDF from one GET request. Its capture flow accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. An MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents using Claude, Cursor, or another MCP client. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. See the ScreenshotNeo docs for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Change the target URL to the page you want to capture. This is a hosted alternative to managing a browser session yourself; it does not replace a page-specific Puppeteer wait when your application needs custom readiness logic. Sign up for 1,000 free screenshots a month with no card.
Frequently Asked Questions
Does `document.fonts.ready` load every font declared in the stylesheet?
No. It waits for the document’s used fonts and associated layout work; unused and some optional fonts may remain unloaded.
Should I use `networkidle0` instead of `networkidle2`?
There is no universally correct network-idle setting. Choose a navigation milestone that suits the page, then verify the app state, fonts, and required images separately.
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.




