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.

There are two ways to make a PDF from a Puppeteer page, depending on what you mean by “screenshot.” Use page.pdf() for a print-style PDF of the web page. To preserve the screenshot’s captured pixels as a PDF page, save the image from page.screenshot() and place it in a PDF with a PDF-writing library. A screenshot call alone does not produce a PDF.

Choose between a page PDF and a screenshot inside a PDF

What you need Use What it produces
A document-style rendering, potentially using print styles and flowing across pages page.pdf() A PDF rendered from the page with print CSS by default
A PDF page that preserves the screenshot image as captured page.screenshot(), then a separate PDF construction step A PDF containing the screenshot image; it does not reflow as page text

Puppeteer’s Page.pdf() method generates a PDF with the print CSS media type. Puppeteer Page.pdf() documentation If you want the screenshot to be the page, use the second approach: choose the image dimensions and PDF page dimensions deliberately, then insert the screenshot bytes into the PDF.

Make a document-style PDF with Puppeteer

The following Node.js example opens a page, waits for navigation to reach network idle, and saves a PDF with a selected paper format, background graphics, and margins. Install Puppeteer first with npm install puppeteer.

const puppeteer = require('puppeteer');

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

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

networkidle2 is a navigation wait condition, not proof that every application-specific component is ready. For a site that loads content after navigation, wait for the selector or state you actually need before calling page.pdf().

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Amazon Basics Multipurpose Copy Printer Paper, 8.5 x 11 Inches, 20 lb, 92 Bright, White, 1 Ream (500 Sheets), Jam-Free
  • 1 ream (500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing

Set print or screen media

PDF generation uses print CSS by default. If the page’s screen layout is what you need, set the media type before generating the PDF:

await page.emulateMediaType('screen');
await page.pdf({ path: 'page.pdf', format: 'A4', printBackground: true });

To use print styles, leave the media type at its default. Sites may alter colors for printing; Puppeteer’s PDF documentation notes that the CSS property -webkit-print-color-adjust can force exact color rendering. Puppeteer Page.pdf() documentation

Rank #2
HP Printer Paper | 8.5 x 11 Paper | Copy &Print 20 lb | 1 Ream Case - 500 Sheets| 92 Bright | FSC Certified | 200060
  • HP Papers is sourced from renewable forest resources and has achieved production with 0% deforestation in North America. Each ream is wrapped in a polyurethane coated paper wrapper to protect the cut sheets from moisture damage
  • Sheet size – 8.5 x 11; Thickness – 20 pounds; Brightness – 92 bright white
  • HP Copy&Print20 20 pounds printer paper is Forest Stewardship Council (FSC) certified and contributes toward satisfying credit MR1 under LEED (Leadership in Energy and Environmental Design)
  • All HP Papers provide premium performance on HP equipment, as well as on all other printer and copier equipment; 100% satisfaction guaranteed; ColorLok technology provides more vivid colors, bolder blacks and faster drying
  • Superior quality, reliability, and dependability for high-volume printing at home, at school and in the office; HP Copy&Print20 print and copy paper prevents yellowing over time to ensure a long-lasting appearance for added archival quality

Choose paper size, dimensions, and layout

PDFOptions lets you set a named paper format (Letter is the default), custom width and height, landscape, margins, page ranges, scaling, and header or footer templates. When custom CSS @page dimensions should control the paper size, set preferCSSPageSize: true. Otherwise, content is scaled to fit the configured paper size. Puppeteer PDFOptions interface

Background graphics are not printed by default; use printBackground: true when they matter. Review the PDFOptions interface for the available options and their defaults.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 3 Reams (1,500 Sheets), 92 Bright White for Home Use
  • 3 ream case (1,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing

Put an exact screenshot on a PDF page

For pixel fidelity to a captured image, make the screenshot first and use a PDF library to place those bytes on a page. Puppeteer supports screenshot options including fullPage, clip, image type, output encoding, and path. The screenshot defaults to PNG, and fullPage defaults to false. These options control the image capture; they do not make the screenshot call return a PDF. Puppeteer ScreenshotOptions interface Puppeteer Page.screenshot() method

Example capture step:

const screenshot = await page.screenshot({
  type: 'png',
  fullPage: true
});

The value of screenshot is image data. To finish the conversion, pass it to a PDF-writing library that can embed PNG data and create a page sized to the image or to your chosen paper dimensions. The specific library and placement code depend on your project; Puppeteer does not provide this image-to-PDF step through page.screenshot().

Rank #4
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 5 Reams (2,500 Sheets), 92 Bright White
  • 5 ream case (2,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing

Control the captured area

  • Use fullPage: true when the capture should extend beyond the current viewport.
  • Use clip when you want only a defined rectangle of the page.
  • Leave both unset for the viewport capture; fullPage defaults to false.

Full-page and clipped captures are still images. If the PDF page must match the screenshot’s proportions without cropping or stretching, choose matching page dimensions or preserve the image’s aspect ratio when placing it in the PDF.

Wait for the right content before capturing

A page can finish navigation before the content you care about appears. Puppeteer’s screenshot guide uses networkidle2 in an example, but this is not a universal readiness guarantee. Puppeteer Screenshots guide For dynamic sites, wait for an application-specific selector or state, then capture or print. Puppeteer’s Page class documentation describes the page methods available for managing the page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 8 Reams (4,000 Sheets), 92 Bright White, Great for Crisp Ink Printing
  • 8 ream case (4,000 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and fixes

  • The output is an image, not a PDF. page.screenshot() returns image bytes by default. Use page.pdf() for a rendered PDF, or add a separate PDF-writing step to embed the screenshot image.
  • The PDF looks different from the browser window. PDF generation uses print media by default. Call page.emulateMediaType('screen') before page.pdf() if you need screen styles.
  • Background colors or images are missing. Set printBackground: true in the PDF options.
  • The PDF has unexpected paper dimensions or scaling. Check the selected format, width, height, margins, and preferCSSPageSize. By default, CSS page dimensions do not take priority over configured paper size.
  • Content is missing from the capture. Navigation completion does not guarantee that asynchronous content is ready. Wait for the relevant content or application state before capturing.
  • The screenshot covers only the visible viewport. Set fullPage: true for a full-page capture, or specify clip for a region.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. It returns a screenshot or PDF with one GET request; for a PDF rendered from a page rather than an image embedded on a PDF page, use its PDF output. Before the capture, it accepts cookie or consent banners as a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. AI agents can use its MCP server tools, including take_screenshot, get_page_info, and capture_pdf.

Example cURL request (see the ScreenshotNeo documentation):

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

The free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is on every plan. Sign up for ScreenshotNeo and get 1,000 free screenshots a month, with no card.

Frequently Asked Questions

Does Puppeteer have a built-in option that converts screenshot bytes directly to PDF?

No. page.screenshot() returns image bytes; embedding them in a PDF requires a separate PDF-writing step.

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

Which Puppeteer method should I use for a searchable, selectable document?

Use page.pdf() for a page-rendered PDF. An image embedded as a PDF page remains image content rather than reflowed page text.

Quick Recap

Bestseller No. 1
Amazon Basics Multipurpose Copy Printer Paper, 8.5 x 11 Inches, 20 lb, 92 Bright, White, 1 Ream (500 Sheets), Jam-Free
Amazon Basics Multipurpose Copy Printer Paper, 8.5 x 11 Inches, 20 lb, 92 Bright, White, 1 Ream (500 Sheets), Jam-Free
1 ream (500 sheets) of 8.5 x 11 white copier and printer paper for home or office use; Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$6.97
Bestseller No. 2
HP Printer Paper | 8.5 x 11 Paper | Copy &Print 20 lb | 1 Ream Case - 500 Sheets| 92 Bright | FSC Certified | 200060
HP Printer Paper | 8.5 x 11 Paper | Copy &Print 20 lb | 1 Ream Case - 500 Sheets| 92 Bright | FSC Certified | 200060
Sheet size – 8.5 x 11; Thickness – 20 pounds; Brightness – 92 bright white
$6.97
Bestseller No. 3
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 3 Reams (1,500 Sheets), 92 Bright White for Home Use
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 3 Reams (1,500 Sheets), 92 Bright White for Home Use
Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$21.96
Bestseller No. 4
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 5 Reams (2,500 Sheets), 92 Bright White
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 5 Reams (2,500 Sheets), 92 Bright White
Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$29.14
Bestseller No. 5
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 8 Reams (4,000 Sheets), 92 Bright White, Great for Crisp Ink Printing
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 8 Reams (4,000 Sheets), 92 Bright White, Great for Crisp Ink Printing
Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$53.19

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.