Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To save a webpage as a PDF in its mobile layout, set the browser’s responsive viewport to the target width before loading the page, then generate a PDF with deliberate screen-or-print and page-size settings. A mobile viewport and a narrow PDF page are separate things: choose both if you need the PDF itself to be phone-width. For a visual record rather than a paginated document, capture a screenshot instead.

Choose between a mobile screenshot and a mobile-width PDF

A responsive viewport controls which layout the webpage renders. PDF paper dimensions control the shape of the exported pages. Setting one does not automatically set the other.

What you need Use What to check
A visual record of the rendered mobile page Set the responsive viewport and capture a screenshot. Choose a viewport-only or full-page capture depending on whether you need content below the fold. A screenshot records pixels; it is not a paginated, text-oriented PDF.
A paginated PDF document Set the viewport, then use browser PDF printing or automation. Print CSS, paper dimensions, margins, scaling, and background settings can all change the output.
A repeatable scripted PDF Use Playwright or Chrome headless. Set the viewport before navigation and configure PDF options explicitly.
Confidence that the page works on an actual phone Test on a real mobile device. Desktop device emulation is an approximation, not execution on phone hardware.

Convert the page manually with Chrome DevTools

  1. Open the page in Chrome and open DevTools.
  2. Toggle the device toolbar to enter Device Mode. In responsive mode, enter the desired viewport width and height, or choose a device dimension.
  3. Navigate to the page or reload it at that size so its responsive CSS is evaluated for the intended viewport.
  4. Decide whether you need a screenshot or a PDF. DevTools supports capturing the visible viewport or a full-page screenshot; use the browser’s print workflow for a PDF.
  5. For a PDF, inspect print preview and the exported file. If the browser applies print styling or standard paper proportions rather than the screen layout or narrow page you want, use an automated workflow that exposes media and paper-size settings.

Google describes Device Mode as a simulation and a first-order approximation; it does not run the page on a real mobile device, and some mobile-specific behavior cannot be simulated. See Chrome’s Device Mode guide.

Generate a mobile-width PDF with Playwright

Set the viewport before navigating. Playwright’s page.pdf() uses print CSS by default. If you want the screen-rendered styling, explicitly emulate screen media before calling it. Then set the PDF page size and margins to match the document you need.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Yojaro 4Pack Silicone Suction Phone Case Mount, Silicon Adhesive Smartphones Stand Sticky, Hands-Free Phone Accessories Holder for Selfies and Videos (Black & White & Translucent & Light Pink)
  • 【Strong Adsorption】The inspiration of the silicone phone suction case comes from the adhesive force of the octopus. Each suction cup phone mount is 3.15 inches long and 2.17 inches wide, with 24 independent suction cups providing a stronger and more stable suction force, so you don't have to worry about your phone falling during use.
  • 【Back of Phone Suction Grip】Remove the adhesive film on the phone suction cup and stick it on the phone case. You can then fix the phone on any smooth surface, which is very convenient. (The phone suction cup cannot be removed and reused after being attached to the phone case. It is recommended to attach it to a regular phone case, not a valuable one.)
  • 【Widely Used】Our non-slip silicone phone sticky grip mount attaches to almost any flat phone case and make it compatible with common mobile phones such as iPhone and Android.You can shoot, watch videos or video calls in the kitchen, gym, dance studio, bathroom and other places.
  • 【Capture the Wonderful Picture】Whether you are a TikTok creator or just like to share videos and photos, this phone suction cup can help you hands-free capture wonderful videos and photos for sharing with friends.
  • 【Note】You can fix the phone suction cup on a smooth surface such as a mirror or glass. If necessary, wipe the suction cup with a damp cloth to obtain stronger suction. Before releasing your hand, make sure the phone is firmly fixed. (Not applicable to rough walls, wooden surfaces, and other uneven surfaces)
const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage({
    viewport: { width: 390, height: 844 }
  });

  await page.goto('https://example.com', { waitUntil: 'networkidle' });

  // Keep screen styles instead of page print styles.
  await page.emulateMedia({ media: 'screen' });

  await page.pdf({
    path: 'mobile-page.pdf',
    width: '390px',
    height: '844px',
    margin: { top: '0', right: '0', bottom: '0', left: '0' },
    printBackground: true
  });

  await browser.close();
})();

Replace the example URL and viewport dimensions with your target. The example creates a PDF page sized to the chosen viewport dimensions; it does not automatically make a multi-page document with one page per mobile screen. For a flowing document, choose a paper height and margins that suit the content, then inspect how it paginates.

Set the viewport and PDF options for the intended result

  • Viewport: width is the key input for triggering responsive breakpoints; choose the CSS-pixel width you want to reproduce. Set the viewport before navigation because many sites are not designed to have their window resized after loading.
  • Media: use page.emulateMedia({ media: 'screen' }) before page.pdf() when screen CSS is required. Omit it if you want the site’s print styling.
  • Page size: use width and height for explicit dimensions, or format for a standard paper size. A standard format may be wider than a phone layout.
  • Units: Playwright interprets unlabeled numeric PDF dimensions as pixels and accepts units such as px, in, cm, and mm.
  • Margins and scale: adjust them to prevent clipping or unwanted whitespace. These affect the page output independently of the viewport.
  • Backgrounds: set printBackground: true if background graphics should appear in the PDF.
  • CSS page size: consider preferCSSPageSize if the page’s CSS page-size rules should take precedence over the configured PDF size.

See the Playwright Page API reference for the current viewport and PDF options.

Rank #2
Apple EarPods Headphones with USB-C Plug, Wired Ear Buds with Built-in Remote to Control Music, Phone Calls, and Volume
  • SUPERIOR COMFORT — Unlike traditional circular ear buds, the design of EarPods is defined by the geometry of the ear. Which makes them more comfortable for more people than any other ear bud–style headphones.
  • HIGH-QUALITY AUDIO — The speakers inside EarPods have been engineered to maximize sound output and minimize sound loss, which means you get high-quality audio.
  • BUILT-IN REMOTE — EarPods with USB-C plug also include a built-in remote that lets you adjust the volume, control the playback of music and video, and answer or end calls with a pinch of the cord.
  • COMPATIBILITY — Works with all devices that have a USB-C port.
  • INTEGRATED MICROPHONE — A built-in microphone precisely captures your voice while you’re on the phone, taking a FaceTime call, or summoning Siri — so you’re always heard loud and clear.

Use Chrome headless or the DevTools Protocol

Chrome headless command line

Chrome headless can write a page to PDF with --print-to-pdf. For pages that need additional loading time, its command-line reference documents --timeout; use --no-pdf-header-footer to omit generated headers and footers.

chrome --headless --print-to-pdf=output.pdf https://example.com

The command above prints the page to PDF, but it does not itself establish the mobile viewport required to trigger responsive styling. Use an automation route that sets a viewport if mobile rendering must be controlled. Flag availability can vary by Chrome version, so check the documentation for the installed version if Chrome rejects an option. See Chrome’s headless command-line reference.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
PopSockets Adhesive Phone Grip, Holder- Black
  • Secure Hold: Our PopSockets adhesive phone grip gives your cell phone a secure, comfortable hold in hand to help prevent drops while texting, taking photos, or scrolling on the go. Designed to stick firmly to most phone cases and devices.
  • Hands-Free Made Easy: Easily turn your PopSocket into a phone stand to prop up your phone anywhere, perfect for watching videos, video calls, or following recipes. A must-have phone holder that keeps your device secure and ready for anything.
  • Compatibility: Works with all phones, tablets, and Kindles. Sticks best to smooth, hard plastic cases and may not adhere to silicone or textured cases. Easily swap your PopTop to change up your style.
  • Black PopSockets: Simple, refined, and endlessly versatile. A timeless essential for any phone.
  • Travel Must-Have for People On the Go: A must-have travel accessory for flights, flying, airports, air travel, airplanes, planes, international trips, cruises, and long travel days. Key gadget for your airport haul, travel accessories and must-haves.

Chrome DevTools Protocol

For lower-level browser automation, the DevTools Protocol method Page.printToPDF exposes paper width and height, margins, orientation, scale, and header/footer templates. Configure those output dimensions deliberately; they are PDF page controls, not a substitute for setting the page’s responsive viewport. The protocol reference is Page.printToPDF.

Inspect and troubleshoot the exported PDF

There is no universal one-click setting that guarantees a mobile-width PDF across sites. Check the exported file in a PDF viewer, especially when the page has dynamic content or print-specific CSS.

Rank #4
360° Rotating Stainless Steel Phone Tether Tab (Silvery 3-Pack) - Universal for iPhone & Other Phones (Fits Wristbands/Necklaces/Crossbody Straps)
  • [360 ° Flexible Rotation Design] Comes with a rotatable lanyard ring that supports 360 ° free rotation, effectively solving the problem of twisted and tangled lanyards
  • [Wide compatibility] The ultra-thin 0.02-inch design does not block the charging port at all, and both wired and wireless charging can be used directly without removing the pad. Compatible with most smartphones such as iPhone, compatible with various wristbands, lanyards, crossbody straps, and keychains
  • [Durable and Portable Material] Premium rust-resistant stainless steel material with good flexibility, which not only avoids scratching the phone case, but also has excellent anti rust and anti fading performance
  • [Multi scenario Practical] Paired with a lanyard or wristband, hands-free use can be achieved. The phone is within reach and not easily dropped, ideal for daily commuting and outdoor activities. Suitable for full coverage phone cases, does not support half coverage phone cases
  • [Quality Service] If you find any damage or other issues with the product upon receipt, please contact us immediately. We will handle it quickly
Symptom Likely cause What to try
The page looks like a desktop layout The viewport was not set to the intended width before navigation, or the site’s breakpoint differs from the assumed device size. Set the target CSS-pixel viewport before loading the URL, then confirm the rendered page is in its mobile layout.
The PDF looks different from the browser PDF generation uses print CSS by default, or the website defines print-only layout rules. In Playwright, emulate screen media before PDF generation if screen styling is desired; otherwise retain print styling intentionally.
The PDF is standard-paper width instead of phone width The PDF paper size was left to defaults or set to a standard format. Set PDF width and height explicitly. Remember that this changes the PDF page dimensions, not the responsive viewport.
Content is clipped, too small, or split unexpectedly Page dimensions, margins, scaling, or pagination do not fit the content. Review width, height or format, margins, and scale; inspect page breaks and overflow in the resulting file.
Background colors or images are missing Background printing is disabled or the page does not print those elements. Enable Playwright’s printBackground option where appropriate and inspect whether print CSS changes the page.
Content is absent or incomplete The page had not finished rendering dynamic content when captured. Wait for the specific content or readiness condition your page requires before generating the PDF. Chrome headless documents a timeout option, but there is no universally correct wait duration.
A Chrome command-line flag is rejected The installed Chrome version may not support that flag. Check the command-line documentation for the installed version and adjust the command accordingly.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo provides a screenshot API and MCP server. Its one-call endpoint returns an image or PDF; the following cURL example requests a PDF at a 390-pixel viewport width. See the ScreenshotNeo API documentation for available parameters and output settings.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com --data-urlencode width=390 --data-urlencode format=pdf -o mobile-page.pdf

ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, with the page verdict and billing status reported in response headers. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for ScreenshotNeo’s free plan.

When desktop emulation is not enough

Chrome Device Mode helps reproduce responsive layouts, but it does not run the page on a phone. If the page’s behavior depends on actual mobile hardware or browser behavior, validate the result on a real device as well as checking the PDF. For a technical distinction between emulation and device testing, see Google’s Device Mode documentation.

Best Value
Anteel 2 Pack Silicone Suction Cup Phone Case Mount Double Sided, Hands-Free Silicon Phone Grip with Higher Suction Power for Selfies and Videos, Non Slip Phone Accessories (LightPink&White)
  • 【PKYAA Double Sided Silicone Suction Phone Case Mount】PKYAA With Double Sided 40 Strong and Reliable individual suction cups, PKYAA provides a thicken and upgraded universal silicon suction mount for your phone.
  • 【Friendly to Content Creators】If you are a content creator or an online influencer, you can create videos anywhere with this suction mount completely hands free with this silicone cell phone mount for cases.
  • 【HANDS-FREE & Adhere to Mirrors】This Double Sided silicone suction phone case mount allows you to stick your phone to the mirror easily. No longer holding your phone in one hand to watch video tutorials while making up.
  • 【Strong Grip on the Smooth Surface】You can easily hang your phone anywhere with a smooth surface. All you do is you clean off your phone and smooth surface. It is STURDY and it not only sticks to mirrors, it also sticks to windows, it sticks to refrigerators, tiles and other clean, flat surfaces.
  • 【Press Down Firmly Every 30 Minutes】Use your palm or fingers to press the phone down firmly and check it's secure before letting go. Apply even pressure for a few seconds to allow the suction cup to adhere properly. To maintain the grip and prevent accidental falls, it's a good practice to periodically reapply pressure to the suction cup.

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.