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

With Puppeteer, set the PDF operation timeout in milliseconds on the page.pdf() options object. A 60-second allowance is:

const pdf = await page.pdf({
  path: 'page.pdf',
  timeout: 60_000,
});

Puppeteer documents 30_000 milliseconds as the default for this operation, and timeout: 0 disables the PDF-operation timeout. That setting does not extend navigation, browser startup, or an outer HTTP/job deadline.

Timeouts in a website-to-PDF job are separate

A conversion normally has several awaited operations. Diagnose and configure the operation that actually rejects:

Phase Puppeteer control What it covers
Browser startup puppeteer.launch({ timeout }) Waiting for Chromium to start. The documented default is 30,000 ms; zero disables this launch timeout.
Navigation page.goto(url, { timeout, waitUntil }) Loading the target URL until the selected navigation condition or timeout.
Application readiness page.waitForSelector(), a delay, or another explicit wait Waiting for client-rendered content, charts, data, or a known ready signal.
PDF rendering page.pdf({ timeout }) The print operation itself, including work such as waiting for fonts.
Outer request or job Your server, queue, proxy, runtime, or caller The total wall-clock deadline. Library options cannot be assumed to override it.

The Puppeteer guide’s sequence is navigation followed by page.pdf(). Treat those as different awaits so an error identifies the phase that needs adjustment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Epson EcoTank ET-2800 Wireless Color All-in-One Supertank Printer - Black
  • INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
  • COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
  • ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
  • HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs

Increase the Puppeteer PDF timeout

Pass a number of milliseconds in the PDF options. This complete example gives printing 60 seconds after a 45-second navigation allowance:

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({ timeout: 30_000 });
try {
  const page = await browser.newPage();

  await page.goto('https://example.com', {
    timeout: 45_000,
    waitUntil: 'domcontentloaded',
  });

  await page.pdf({
    path: 'page.pdf',
    format: 'A4',
    printBackground: true,
    timeout: 60_000,
  });
} finally {
  await browser.close();
}

Use an explicit value on page.pdf() when one route is slower than the rest of your application. Puppeteer’s current PDFOptions documentation lists 30,000 ms as the default. Documentation and APIs can change, so check the version installed in your project; the search result for the reviewed material showed Puppeteer 25.12.0.

Change the default instead

Page.setDefaultTimeout() can change Puppeteer’s default timeout for operations that use the general page timeout. An explicit timeout on page.pdf() is clearer because it documents the budget for printing and avoids changing unrelated waits. Keep the PDF option explicit when different phases need different limits.

Disable only the PDF operation timeout

const pdf = await page.pdf({
  path: 'page.pdf',
  timeout: 0,
});

Zero disables Puppeteer’s timeout for that PDF operation. It does not disable navigation, launch, selector waits, or an application-level deadline. An unlimited print call can hold a worker indefinitely if the page never finishes, so use it only when an outer cancellation policy still exists.

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

Set navigation and readiness timeouts separately

If page.goto() rejects, changing page.pdf({ timeout }) will not help. Configure navigation directly:

Rank #2
Sale
Epson EcoTank Photo ET-8550 Wireless Wide-Format All-in-One Tank Printer
  • CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
  • INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
  • PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
  • ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴
await page.goto('https://example.com/report', {
  timeout: 45_000,
  waitUntil: 'domcontentloaded',
});

The waitUntil value is a readiness choice, not a universal performance setting. An early event such as domcontentloaded can occur before a client-rendered report appears. Waiting for a later event or a known application signal can take longer on pages with persistent activity.

Wait for the content your PDF needs

await page.goto('https://example.com/report', {
  timeout: 45_000,
  waitUntil: 'domcontentloaded',
});

await page.waitForSelector('#report-ready', {
  timeout: 20_000,
});

await page.pdf({
  path: 'report.pdf',
  timeout: 60_000,
});

Use a selector, a deliberate delay, or another explicit readiness test when the page exposes one. The Puppeteer PDF guide says font loading is awaited by default, so font readiness can be part of the render wait even after navigation has completed.

About networkidle

Puppeteer examples demonstrate waitUntil: 'networkidle2', but that example is not a requirement for every site. Pages with analytics, polling, advertisements, or open connections may never become quiet quickly. Choose the event that matches the page’s behavior and verify that the content required in the PDF is present.

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

Give the whole job an outer deadline

A web server, queue worker, proxy, hosting runtime, or caller may stop waiting before Puppeteer’s own timers expire. The following pattern applies an application deadline while still closing the browser:

import puppeteer from 'puppeteer';

async function renderPdf(url, outputPath) {
  const browser = await puppeteer.launch({ timeout: 30_000 });
  let timer;
  try {
    const work = (async () => {
      const page = await browser.newPage();
      await page.goto(url, {
        timeout: 45_000,
        waitUntil: 'domcontentloaded',
      });
      await page.waitForSelector('#report-ready', { timeout: 20_000 });
      await page.pdf({
        path: outputPath,
        timeout: 60_000,
        printBackground: true,
      });
    })();

    const deadline = new Promise((_, reject) => {
      timer = setTimeout(() => {
        reject(new Error('PDF job exceeded the 90-second application deadline'));
      }, 90_000);
    });

    await Promise.race([work, deadline]);
  } finally {
    if (timer) clearTimeout(timer);
    await browser.close();
  }
}

await renderPdf('https://example.com/report', 'report.pdf');

Promise.race() rejects the caller’s wait; it does not magically cancel every underlying browser action. Closing the browser in finally is what releases the Chromium process when the outer deadline wins. Adapt cancellation and temporary-file cleanup to your worker or HTTP framework.

Rank #3
HP Smart Tank 5000 Wireless All-in-One Ink Tank Printer, Scanner, Copier with 2 Years of Ink Included, Best-for-Home, Cartridge-Free, Refillable and AI-Enabled. (5D1B6A)
  • SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
  • INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
  • KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
  • PREMIUM SUPPORT - Strong technical expertise to solve issues faster
  • THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.

Find which await is timing out

Observed symptom Likely phase First check
Error occurs before a page exists Launch Inspect puppeteer.launch({ timeout }), executable availability, and host resources.
Navigation timeout page.goto() Test the URL from the same machine, then adjust its timeout or readiness event.
Selector wait timeout Application readiness Confirm the selector exists in the rendered DOM and that scripts, authentication, and data requests succeeded.
PDF timeout after successful navigation page.pdf() Increase the PDF option, inspect very large pages and fonts, and check whether an outer deadline fired first.
Request is terminated without a Puppeteer error Infrastructure Inspect server, proxy, queue, or runtime limits; a library timeout cannot extend those limits.

Log phase boundaries

console.time('goto');
await page.goto(url, { timeout: 45_000, waitUntil: 'domcontentloaded' });
console.timeEnd('goto');

console.time('ready');
await page.waitForSelector('#report-ready', { timeout: 20_000 });
console.timeEnd('ready');

console.time('pdf');
await page.pdf({ path: 'report.pdf', timeout: 60_000 });
console.timeEnd('pdf');

These separate timers show whether the delay is network, page code, readiness logic, or printing. Do not infer an average conversion time from the documented defaults; they are API defaults, not performance benchmarks.

Reliability and cost considerations

  • Prefer a finite timeout for every phase in a production worker and enforce a larger outer deadline.
  • Use a readiness signal tied to the actual report rather than waiting for arbitrary network quiet.
  • Close the browser in a finally block so failures do not leak Chromium processes.
  • Write to a temporary path and publish the file only after page.pdf() resolves successfully.
  • Recheck timeout defaults and option names against the Puppeteer version installed in your lockfile.
  • There is no documented benchmark that makes one timeout value correct for all sites; page size, scripts, fonts, network conditions, and host capacity determine the needed budget.

Puppeteer and Playwright: what differs

Playwright also has page.pdf() and a configurable operation timeout, but do not apply Puppeteer defaults to Playwright. Playwright documents these navigation completion choices:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • commit
  • domcontentloaded
  • load
  • networkidle

Its current Page API discourages networkidle for tests and recommends web assertions to assess readiness. The practical rule is the same: select a completion condition that matches the page, then wait for an explicit ready signal when client rendering matters. Consult the API reference for the exact defaults of the installed Playwright version.

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 is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF, so your Node.js service does not need to launch or maintain a browser for this conversion path.

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`ScreenshotNeo request failed: ${res.status}`);
const file = Buffer.from(await res.arrayBuffer());
await fs.promises.writeFile('shot.webp', file);

See the parameter reference and output details in the ScreenshotNeo documentation. Equivalent requests are:

Rank #4
NDYIN Portable Printers Wireless for Travel, N80 Bluetooth Thermal Printer
  • Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
  • No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
  • Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
  • Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
  • The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art
curl -G 'https://api.screenshotneo.com/v1/shot' -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get('https://api.screenshotneo.com/v1/shot', params={'access_key': 'YOUR_API_KEY', 'url': 'https://stripe.com'}, timeout=90)
r.raise_for_status()
open('shot.webp', 'wb').write(r.content)

Before capture, ScreenshotNeo can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

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.

Other controls include full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF paper settings and page ranges, custom CSS and JavaScript, clicks, selector waits, delays, network-idle waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, TTL caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Common screenshot-API parameter names are accepted to ease migration.

The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; annual billing gives two months free, and every feature is available on every plan. Create a free ScreenshotNeo account to try the 1,000 included screenshots.

Frequently Asked Questions

Can I set one global timeout for launch, navigation, and PDF generation?

You can establish a shared application deadline, but Puppeteer’s launch, navigation, readiness waits, and PDF rendering remain separate operations. Configure each phase deliberately and keep the outer deadline independent.

What should I verify after upgrading Puppeteer?

Check the installed package’s PDFOptions, LaunchOptions, and Page APIs for current defaults and supported values. Living documentation can change, so do not rely on an older copied snippet.

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

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.