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

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Set the PDF operation timeout in Puppeteer’s page.pdf() options. For a 60-second allowance, use timeout: 60_000:

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

This controls PDF rendering only. Navigation, browser startup, readiness checks, and your HTTP or job deadline are separate waits and must be configured separately.

The direct fix: set timeout on page.pdf()

Puppeteer’s PDFOptions.timeout value is milliseconds. The documented default is 30,000 ms (30 seconds); 0 disables the PDF-operation timeout. A larger value gives Chromium more time to lay out and print the page, but it cannot extend a timeout imposed by the server, queue, proxy, hosting runtime, or caller around your Node.js process.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.goto('https://example.com');

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

Use the Puppeteer version installed in your project as the authority for current option names and defaults. Living API documentation can change; the values above reflect the current documentation context (the search results identified Puppeteer 25.12.0).

#1 Best Overall
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
  • EDIT text, images & designs in PDF documents. ORGANIZE PDFs. Convert PDFs to Word, Excel & ePub.
  • READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.
  • CREATE, COMBINE, SCAN and COMPRESS PDFs
  • FILL forms & Digitally Sign PDFs. PROTECT and Encrypt PDFs
  • LIFETIME License for 1 Windows PC or Laptop. 5GB MobiDrive Cloud Storage Included.

Timeouts belong to different phases

A conversion request normally has several awaited operations. Identify the one that rejects before changing a number.

Browser startup

puppeteer.launch({ timeout }) governs how long Puppeteer waits for the browser process to start. Its documented default is 30,000 ms, and 0 disables this launch timeout.

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

This does not change navigation or PDF rendering timeouts.

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

Navigation

page.goto() has its own timeout and completion condition. Set it in the navigation options:

Rank #2
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
  • Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.
  • Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
  • Read & Annotate. Enjoy intuitive reading modes and powerful tools to comment, highlight, and mark up PDFs.
  • Create & Manage PDFs. Create new PDFs, combine multiple files, scan documents, and compress for easy sharing.
  • Fill & Sign Forms. Complete forms and digitally sign documents with secure e-signature tools.
await page.goto('https://example.com', {
  timeout: 45_000,
  waitUntil: 'domcontentloaded',
});

The example deliberately uses domcontentloaded; select a condition that matches the site. An early event can occur before client-rendered content is ready, while waiting for complete loading or network quiet can take longer on pages with persistent activity.

Application readiness

After navigation, wait for a known application signal when necessary. This can be a selector, a short delay, or another condition implemented by your code:

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

A readiness wait is not part of page.pdf()’s own operation timeout. If the selector never appears, increasing the PDF timeout cannot fix that failure.

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.

PDF rendering

Finally, page.pdf() performs layout and printing. Puppeteer’s guide says PDF generation waits for fonts by default, so font loading can be included in this wait. Configure the operation directly:

Rank #3
Adobe Acrobat Pro | PDF Software | Convert, Edit, E-Sign, Protect | PC/Mac Online Code | Activation Required
  • Create and edit PDFs. Collaborate with ease. E-sign documents and collect signatures. Get everything done in one app, wherever you go.
  • Edit text and images without jumping to another app.
  • E-sign documents or request e-signatures on any device. Recipients don’t need to log in to e-sign.
  • Convert PDFs to editable Microsoft Word, Excel, or PowerPoint documents.
  • Share PDFs for collaboration. Commenting features make it easy for reviewers to comment, mark up, and annotate.
const pdf = await page.pdf({
  path: 'report.pdf',
  timeout: 60_000,
});

Outer request or job deadline

Your web framework, reverse proxy, serverless runtime, queue worker, or client may stop the request before Puppeteer finishes. That deadline is outside Puppeteer. Verify the actual deployment’s limit and design long conversions as background jobs when an interactive request cannot remain open long enough.

A complete, diagnosable conversion function

This example keeps each phase explicit and always closes the browser:

import puppeteer from 'puppeteer';

export async function websiteToPdf(url, outputPath) {
  const browser = await puppeteer.launch({ timeout: 30_000 });
  try {
    const page = await browser.newPage();

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

    await page.waitForSelector('body', { timeout: 20_000 });

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

websiteToPdf('https://example.com', 'page.pdf')
  .catch((error) => {
    console.error('Conversion failed:', error);
    process.exitCode = 1;
  });

Log which await is running when an error occurs. Separate messages for launch, navigation, readiness, and PDF generation make the failing phase apparent instead of treating every error as a “PDF timeout.”

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

How to increase or disable Puppeteer’s PDF timeout

Increase it

Pass a larger millisecond value in the PDF options:

Rank #4
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
  • Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.
  • EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
  • READ and Comment on PDFs – Intuitive reading modes & document commenting and mark up tools!
  • CREATE, COMBINE, SCAN and COMPRESS PDFs.
  • FILL forms & Digitally Sign PDFs. Work with Digital certificates
await page.pdf({ path: 'page.pdf', timeout: 120_000 });

Choose the value from the slowest page you actually need to support, plus reasonable margin. There is no universal conversion-duration benchmark in the cited documentation.

Disable only the PDF-operation timeout

Set timeout: 0:

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

Disabling this guard can leave a worker waiting indefinitely if a page or browser becomes stuck. Use an outer cancellation, queue lease, or process supervisor so an unresponsive job is still recoverable.

Change the default for page operations

Page.setDefaultTimeout() can change Puppeteer’s default timeout for applicable page operations. It does not replace an explicit timeout on page.pdf(), nor does it configure browser launch or infrastructure deadlines. Check the installed version’s API for the exact scope of the default.

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.

Why PDF conversion times out

  • Navigation is slow or never reaches its condition: the rejection comes from goto(), not pdf(). Raise the navigation timeout or choose a more appropriate readiness condition.
  • Client rendering is incomplete: navigation completed, but the report appears later. Wait for a specific ready selector or application signal before printing.
  • Fonts or assets are still loading: PDF generation waits for fonts by default. Ensure the browser can reach those resources and allow enough PDF time.
  • The browser cannot start: inspect puppeteer.launch(), executable availability, permissions, and its separate launch timeout.
  • An outer deadline fires: a proxy or job system may terminate the operation even after you increase Puppeteer’s setting. Raise that limit where appropriate or move conversion to an asynchronous worker.
  • Resources are leaked: not closing browsers can exhaust memory and make later launches slow or fail. Use try...finally as shown.

Choosing a navigation readiness signal

Puppeteer examples commonly navigate and then print, sometimes using waitUntil: 'networkidle2'. That example is not a requirement for every site. Pages with analytics, live updates, polling, or long-lived connections may never become genuinely quiet in a useful time window.

Best Value
PDF Pro 3 - PDF editor to create, edit, convert and merge PDFs - 100% Compatible with Adobe Acrobat - for Windows 11, 10, 8.1, 7
  • ALL-IN-ONE SOLUTION – read, edit, convert, merge and protect your PDF files
  • MAXIMUM FUNCIONALITY – create interactive forms, compare PDFs, bates numbering, find and replace text or colors, convert documents, OCR engine, comment, highlight, fill out and print forms, document protection and others
  • EASY TO INSTALL AND USE – well-structured user-interface, in-program instructions, free tech support whenever you need it
  • GREAT VALUE FOR MONEY - why spend a fortune if you can have maximum functionality at a reasonable price - this also fits the requirements of companies very well

Playwright documents commit, domcontentloaded, load, and networkidle navigation choices. Its current Page API discourages networkidle for tests and recommends assertions that verify readiness. If you use Playwright instead of Puppeteer, keep its timeout behavior and defaults separate from Puppeteer’s; consult the installed Playwright version’s API reference. The practical rule is the same: use the earliest event that is known to precede correct output, then wait for an explicit page signal when content is rendered asynchronously.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

cURL, Python, and Node.js alternatives

If you need a service rather than maintaining Chromium setup, ScreenshotNeo is a website screenshot API and MCP server. It is useful when you want an image or PDF from one HTTP request.

cURL

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

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)

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}`);
if (!res.ok) throw new Error(`ScreenshotNeo returned ${res.status}`);
const data = Buffer.from(await res.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', data));

See the ScreenshotNeo documentation for request options and response details. The API base is https://api.screenshotneo.com/v1/shot; adapt the target URL and output format to your job.

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

Or skip the browser setup

ScreenshotNeo accepts cookie and consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

Every feature is available on every plan. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Other plans are Starter $5/3,000, Growth $15/15,000, Pro $39/60,000, Scale $99/250,000, and Business $249/1,000,000; yearly billing gives two months free. See ScreenshotNeo and the API documentation, then sign up free.

Operational and cost considerations

  • Keep phase timeouts finite and make the outer job deadline longer than the sum of expected launch, navigation, readiness, and PDF work.
  • Reuse a controlled browser process only when your workload and isolation requirements permit it; otherwise close each browser reliably.
  • Record URL, phase, timeout, elapsed time, and error so retries target the failed phase.
  • Do not treat a timeout increase as a performance fix. Reduce unnecessary page work, wait for a precise signal, and avoid waiting for perpetual network activity.
  • For service-based capture, inspect billing and verdict headers so failed or unbillable outcomes are handled distinctly from successful documents.

Quick troubleshooting checklist

  1. Identify the rejected call: launch, goto, readiness wait, pdf, or surrounding code.
  2. Set the timeout on that operation, in milliseconds; do not assume page.pdf() controls earlier phases.
  3. Confirm the selected waitUntil condition and add an explicit ready selector for client-rendered pages.
  4. Check font and asset accessibility from the browser process.
  5. Compare the Puppeteer deadline with the HTTP, proxy, serverless, or queue deadline.
  6. Close the browser in finally and add an outer job cancellation if you use timeout: 0.

Frequently Asked Questions

Does page.pdf() timeout include page.goto()?

No. Navigation and PDF rendering are separate awaited operations with separate timeout settings.

What unit does Puppeteer use for the PDF timeout?

Milliseconds; for example, 60_000 is 60 seconds.

Can I use the same timeout settings in Playwright?

Do not assume so. Playwright has its own API semantics and defaults; verify the version installed in your project.

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

The Bottom Line

Set timeout in page.pdf() for rendering, configure goto() and launch separately, and account for the outer deadline that Puppeteer cannot override.

Quick Recap

Bestseller No. 1
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.; CREATE, COMBINE, SCAN and COMPRESS PDFs
$99.99
Bestseller No. 2
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.; Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
$99.99
Bestseller No. 3
Adobe Acrobat Pro | PDF Software | Convert, Edit, E-Sign, Protect | PC/Mac Online Code | Activation Required
Adobe Acrobat Pro | PDF Software | Convert, Edit, E-Sign, Protect | PC/Mac Online Code | Activation Required
Edit text and images without jumping to another app.; Convert PDFs to editable Microsoft Word, Excel, or PowerPoint documents.
$239.88
Bestseller No. 4
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.; EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
$99.99
Bestseller No. 5
PDF Pro 3 - PDF editor to create, edit, convert and merge PDFs - 100% Compatible with Adobe Acrobat - for Windows 11, 10, 8.1, 7
PDF Pro 3 - PDF editor to create, edit, convert and merge PDFs - 100% Compatible with Adobe Acrobat - for Windows 11, 10, 8.1, 7
ALL-IN-ONE SOLUTION – read, edit, convert, merge and protect your PDF files
$29.99

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.