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

Short answer: Puppeteer has no single DPI setting shared by PDFs and screenshots. page.pdf() uses print layout and physical page geometry, while page.screenshot() produces raster pixels controlled by viewport size and deviceScaleFactor. Chromium’s print conversion uses 96 CSS pixels per inch and 72 points per inch, but that does not mean every Puppeteer PDF is universally “96 DPI” or “300 DPI.”

PDF DPI and screenshot resolution are different concepts

A PDF generated by Puppeteer is a print-oriented document. Text, vector graphics and layout are positioned on a page defined by a paper format or explicit width and height. A screenshot is a bitmap: its resolution is the number of pixels in the captured image. Treating both outputs as if they shared one DPI switch leads to incorrect settings and disappointing print results.

Output What Puppeteer controls How resolution is interpreted
PDF Paper size, CSS @page rules, margins, print media and scale Physical page geometry; CSS and print units are converted for the PDF
Screenshot Viewport width and height, deviceScaleFactor, clipping and full-page options Raster pixel dimensions; physical DPI depends on later display or print size

What DPI does Puppeteer use for PDFs?

Puppeteer’s documented PDF API does not expose a general-purpose DPI option. Chromium’s conversion model defines 96 CSS pixels per inch and 72 points per inch. Those are unit conversions used to lay out the printed page, not a promise that a PDF is rasterized at a particular dots-per-inch value.

Why “Puppeteer PDFs are 300 DPI” is misleading

Chromium source contains a kDefaultPdfDpi constant set to 300 in its printing units header. That constant belongs to Chromium’s internal printing context. It is not a user-facing Puppeteer option and does not establish that every PDF made through page.pdf() has an effective 300-DPI resolution. A PDF may contain selectable text and vectors rather than one raster image whose DPI can be measured.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

The settings that actually change PDF output

  • Paper format: Use a named format such as A4 or Letter, or provide width and height.
  • CSS page size: Set preferCSSPageSize: true when the document’s @page rule should determine the paper dimensions.
  • Margins: Configure margin values so content is not clipped or unexpectedly reflowed.
  • Scale: Puppeteer documents scale with a default of 1 and an allowed range of 0.1 to 2. This scales the printed layout; it is not a DPI selector.
  • Media type: PDF generation uses print media by default. Call page.emulateMediaType('screen') first when the screen stylesheet, rather than print CSS, is required.

How to generate a predictable PDF

The following Node.js example uses a fixed paper format, explicit margins, CSS page-size preference and print media. Install Puppeteer with npm install puppeteer.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({headless: true});
  try {
    const page = await browser.newPage();
    await page.goto('https://example.com', {waitUntil: 'networkidle2'});

    // Print CSS is the default. Use this line only for screen styling:
    // await page.emulateMediaType('screen');

    await page.pdf({
      path: 'output.pdf',
      format: 'A4',
      printBackground: true,
      preferCSSPageSize: true,
      margin: {
        top: '16mm',
        right: '16mm',
        bottom: '16mm',
        left: '16mm'
      },
      scale: 1
    });
  } finally {
    await browser.close();
  }
})();

To control the page in CSS, add an @page rule such as @page { size: A4; margin: 16mm; }. If the document must fit a specific physical sheet, use the same units consistently and verify page breaks rather than trying to raise a nonexistent PDF DPI setting.

What DPI does Puppeteer use for screenshots?

A screenshot has no intrinsic physical DPI until someone assigns it a physical size. For example, a 1,200-pixel-wide image printed at 12 inches is 100 pixels per inch; printed at 6 inches it is 200 pixels per inch. The file’s pixel dimensions stay the same.

Puppeteer’s viewport uses CSS pixels. The documented deviceScaleFactor defaults to 1 and determines how many device pixels are produced for each CSS pixel. A 1,000-CSS-pixel viewport at a factor of 1 normally yields about 1,000 device pixels; at a factor of 2 it yields about 2,000 device pixels. This is device scaling, not a physical DPI metadata setting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Increase screenshot pixel output with the viewport and device scale

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({headless: true});
  try {
    const page = await browser.newPage();
    await page.setViewport({
      width: 1440,
      height: 900,
      deviceScaleFactor: 2
    });
    await page.goto('https://example.com', {waitUntil: 'networkidle2'});
    await page.screenshot({
      path: 'retina.png',
      type: 'png',
      fullPage: true
    });
  } finally {
    await browser.close();
  }
})();

Use a larger viewport when you need more layout area and a higher device scale when you need more pixels for the same CSS geometry. Both increase memory use and image size. They can also expose responsive breakpoints differently, so select values that represent the device or design being tested.

Screenshot options that affect the result

  • fullPage: Captures the complete scrollable page instead of only the viewport.
  • clip: Captures a defined rectangle in CSS-pixel coordinates.
  • type: Choose PNG, JPEG or WebP where supported; JPEG/WebP quality settings trade detail for file size.
  • omitBackground: Removes the default background when a transparent result is needed and the selected format supports it.
  • Viewport dimensions: Width and height control responsive layout before the device scale is applied.

Does deviceScaleFactor change PDF DPI?

No. deviceScaleFactor is documented as a viewport setting for screen rendering and screenshots. PDF generation follows the print path, with paper dimensions, CSS page rules, margins and PDF scale. Setting a high device scale before calling page.pdf() is not a documented way to select PDF DPI.

Choosing settings for common goals

Web or visual regression tests

Fix the viewport width and height, then choose a device scale that matches the environment you want to compare. Keep these values constant across runs. A different scale changes pixel dimensions and can make otherwise identical pages fail a pixel comparison.

High-resolution marketing screenshots

Use the intended CSS layout width and a device scale of 2 when a denser raster is useful. Check the resulting pixel dimensions and file size; do not label the output “300 DPI” unless you also specify the physical print size that produces 300 pixels per inch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Print-ready documents

Prefer PDF. Set the paper format or CSS @page size, margins and print backgrounds, then inspect page breaks and fonts. If a printer requires a specific raster DPI, rasterize the finished PDF in a separate, print-specific step at that printer’s required resolution.

One element or a long page

For one component, determine its bounding box and pass it through clip. For a long page, use fullPage: true, but be aware that extremely tall pages can consume substantial memory. Splitting a long capture into known sections may be safer for automation pipelines.

Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server. A single request returns PNG, JPEG, WebP or PDF, while its capture pipeline accepts consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before the shot. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status.

Use the API documentation at https://screenshotneo.com/docs/ for all options. A basic request is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The same call in Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

And Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients. It includes full-page capture, CSS-selector element capture, dark mode, 12 device presets, custom viewport and retina scale, PDF paper controls, custom CSS/JavaScript, click and wait actions, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, TTL caching, signed links, asynchronous jobs, bulk capture of up to 100 URLs per call, usage data and an OpenAPI specification. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. Create your free ScreenshotNeo account.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes and fixes

Calling a screenshot “96 DPI”

Fix: report its pixel dimensions and the intended display or print size. The 96 CSS-pixels-per-inch conversion does not assign physical DPI to a bitmap file.

Expecting deviceScaleFactor to sharpen a PDF

Fix: adjust PDF paper geometry, CSS page rules, margins and scale. Use a screenshot scale only for raster captures.

Content disappears in the PDF

Cause: print media CSS hides or restyles it. Fix: inspect print styles, or call emulateMediaType('screen') when screen styling is intentional.

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

Images are blank or low quality

Cause: capture occurs before lazy images or fonts finish loading. Fix: wait for a selector, a known delay or network idle, and ensure the resources are reachable from the browser process.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

The page is clipped or unexpectedly paginated

Cause: margins, fixed dimensions or conflicting @page rules. Fix: choose either the requested paper format or preferCSSPageSize, then test with explicit margins and page-break rules.

Memory or timeout failures

Cause: very large full-page screenshots, heavy scripts or slow third-party resources. Fix: use a bounded clip, wait for a specific readiness condition instead of an unlimited network-idle assumption, block unnecessary requests, and set a practical navigation timeout.

Version and compatibility notes

The documented API search identifies Puppeteer 25.12.0 for PDF and viewport options. Exact behavior still depends on the installed Puppeteer package, bundled or connected Chromium version and protocol implementation. Pin versions in automated builds and validate output after upgrades, especially when print layout or screenshot pixel comparisons are part of a release gate.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Frequently Asked Questions

Can I set a DPI value in Puppeteer’s page.pdf() options?

No. The documented PDF options provide page dimensions, margins, CSS page-size preference and a 0.1–2 scale range, but no general PDF DPI field.

What is the fastest way to make a Puppeteer screenshot larger?

Increase viewport dimensions for more CSS layout area, increase deviceScaleFactor for more device pixels, or use both while checking memory and responsive-layout effects.

Are Puppeteer PDFs vector or raster images?

A PDF can contain text and vector graphics as well as raster assets, so a single DPI number does not describe the entire document.

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.

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