The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Set deviceScaleFactor in the viewport with page.setViewport() before you navigate, then capture the page with page.screenshot(). For example, this uses an illustrative 390-by-844 CSS-pixel viewport at a scale factor of 3; those values are not a recommendation for a particular phone.
Set a manual mobile viewport and device scale factor
In Puppeteer, the page viewport configuration is where you choose the emulated device pixel ratio for this screenshot workflow. Set it before calling page.goto() so the page loads under the intended conditions:
As an Amazon Associate I earn from qualifying purchases.
const page = await browser.newPage();
await page.setViewport({
width: 390,
height: 844,
deviceScaleFactor: 3,
isMobile: true,
hasTouch: true,
});
await page.goto('https://example.com');
await page.screenshot({ path: 'mobile.png' });
The width and height are viewport dimensions, and deviceScaleFactor sets the emulated scale. Confirm supported viewport fields against the Puppeteer Viewport API for the version you use. Puppeteer warns that changing the viewport resizes the page and that changes to mobile or touch properties can reload it. Applying the configuration before navigation avoids changing those conditions after the site has loaded.
Use a bundled profile when you want a named device
If the goal is to approximate a known device profile rather than select each setting yourself, use Puppeteer’s KnownDevices and page.emulate() before navigation:
#1 Best Overall
- YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
- LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
- MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
- NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
- BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
import { KnownDevices } from 'puppeteer';
const page = await browser.newPage();
await page.emulate(KnownDevices['iPhone 17 Pro']);
await page.goto('https://example.com');
await page.screenshot({ path: 'mobile.png' });
page.emulate() is a shortcut that applies device metrics and a user agent through the equivalent of page.setUserAgent() and page.setViewport(). The bundled device list can change between Puppeteer versions, so check the profile name and current API when updating Puppeteer. The official guidance recommends emulating before navigation because some sites do not expect their viewport to change after loading.
Choose manual settings or a device profile
| Approach | Use it when | What it configures |
|---|---|---|
Manual page.setViewport() |
You need direct control of width, height, scale factor, or supported mobile and touch flags. | The viewport metrics and options you specify. |
page.emulate(KnownDevices[...]) |
You want a Puppeteer-bundled named profile rather than choosing its metrics individually. | Device metrics and a user agent. |
Neither method is established as universally more accurate for every website. Choose based on the viewport dimensions, pixel density, user-agent behavior, and mobile or touch behavior the page needs.
Rank #2
- Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
- DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
- CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
- PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
- BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.
Do not confuse viewport emulation with screen configuration
deviceScaleFactor is the viewport-emulation setting used to choose scale for the page screenshot. Puppeteer’s separate ScreenInfo API includes a devicePixelRatio field for reported screen information, and the headless screen-configuration guide covers configuring screens. That separate screen API does not replace the viewport setup for ordinary page emulation.
Device pixel ratio is also separate from the region captured. Screenshot options such as fullPage, clip, and captureBeyondViewport affect what area is captured; they are not substitutes for setting the viewport’s scale factor.
Rank #3
- YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
- LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
- MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
- NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
- BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
Capture the viewport, a region, or the full page
A basic screenshot can infer its image type from the filename extension; PNG is the documented default. Use screenshot options to change the captured area or format:
page.screenshot({ path: 'mobile.png' })captures a normal screenshot.fullPage: truerequests a full-page capture.clipspecifies a region to capture.captureBeyondViewportcontrols capturing outside the viewport in relevant cases.- JPEG quality applies to formats that support it; it does not apply to PNG.
For example, to save the full page as a JPEG:
await page.screenshot({ path: 'mobile.jpg', type: 'jpeg', quality: 85, fullPage: true });
For a clipped area, supply its position and dimensions in CSS pixels:
Rank #4
- PRIVACY DISPLAY: Automatically hide your screen from those beside you. The built-in privacy display can be preset¹ to turn on when receiving notifications, typing passwords, or using specific apps
- TYPE IT IN. TRANSFORM IT FAST: Enhance any shot in seconds on your smartphone by using Photo Assist² with Galaxy AI.³ Add objects, restore details, or apply new styles by simply typing or tapping
- NIGHTS, CAPTURED CLEARLY: From gigs to city lights, record and capture moments after dark with clarity using Nightography so your photos and videos stay crisp and clear on your Samsung Galaxy
- MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile phone, whether it’s a special contact photo, custom wallpaper, an invitation or more⁴
- HELP THAT KEEPS UP: Stay in the moment while Now Nudge with Galaxy AI helps you respond faster and stay organized with smart suggestions⁵ that appear exactly when you need them on your phone
await page.screenshot({
path: 'header.png',
clip: { x: 0, y: 0, width: 390, height: 160 },
});
Capture behavior and final dimensions can depend on capture mode and browser implementation; the documented options do not establish a universal output-dimension rule across backends.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteUse a deliberate navigation and readiness sequence
- Create a page from your Puppeteer browser.
- Apply a manual viewport or a named device profile before navigation.
- Navigate to the target URL.
- Wait for the page state required by the screenshot, then call
page.screenshot()with the desired capture options.
The right readiness condition depends on the site’s network activity and rendering. A navigation wait condition that works for one page may be unsuitable for another. Puppeteer’s screenshot guide demonstrates navigation waiting and screenshot capture; choose a condition appropriate to the page you are capturing rather than assuming one condition fits all sites.
Best Value
- Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Activating is easy, just 3 steps.
- ACTIVATION Promotion: Includes 1500 min, 1500 texts & 1500 MB Data + add more as you need it
- CAMERA SYSTEM: 50MP Quad Pixel camera. Capture sharper, more vibrant photos day or night with 4x the light sensitivity.
- PERFORMANCE: Blazing-fast Qualcomm performance. Get the speed you need for great entertainment with a Snapdragon 680 processor and 4GB of RAM.
- 64GB built-in storage. Get plenty of room for photos, movies, songs, and apps. Made for US
Troubleshoot common mobile screenshot problems
- The page looks like desktop after setting mobile options. Make sure
isMobileand, if needed,hasTouchare set in the viewport, or use a named device profile that also applies a user agent. - The page reloads or changes layout unexpectedly. Set the viewport or emulate the device before
page.goto(); changing these values after loading can resize or reload the page. - The screenshot is the wrong size or region. Check the viewport width and height separately from screenshot options. Remove or correct
cliporfullPageif the captured region is not what you intended. - A full-page capture omits content that appears after scrolling. The screenshot options govern capture area, but page content may also depend on lazy loading or application behavior. Wait for the required content to render before capture.
- The screenshot has a different file type or quality than expected. Use a filename extension or explicit type appropriate to the desired format. JPEG quality is not a PNG setting.
- A device name cannot be found. Verify the spelling against the
KnownDeviceslist for the installed Puppeteer version; available profiles can change.
Or skip the browser setup
ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns an image or PDF, without configuring Puppeteer in your own browser process. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo accepts cookie or 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, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The Free plan includes 1,000 shots per month with no card, and paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
PC 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 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFrequently Asked Questions
Does deviceScaleFactor change the CSS viewport width?
No. It is a separate viewport-emulation setting from the configured width and height.
Can I use deviceScaleFactor with Puppeteer’s KnownDevices profiles?
Use a named profile as supplied when you want its bundled device metrics and user agent; use manual viewport settings when you need direct control over the individual values.
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.




