Scale Puppeteer PDF generation by putting a bounded queue in front of browser work, managing browser and page lifecycles deliberately, and measuring capacity with the documents and runtime you actually deploy. Puppeteer documents the rendering and isolation APIs, but it does not prescribe a safe production concurrency or throughput figure. Treat your limit as a result of load testing—not a number to copy from an example.
What determines PDF-generation capacity?
A PDF job is browser rendering work. Its cost depends on the page, its assets and fonts, the output settings, and the resources available to the running browser. A service can accept more simultaneous jobs only while it still meets its own latency, memory, CPU, failure-rate, and output-correctness targets.
Puppeteer’s official documentation, identified as version 25.12.0 in the references here, describes PDF generation, browser management, and page metrics, but does not publish workload-matched production capacity figures. Do not turn an API default, a page count, or a context count into a concurrency recommendation. Measure with representative jobs on the browser and Node.js versions you intend to deploy. See the PDF generation guide and browser management guide.
Put bounded admission control in front of rendering
Do not launch a new browser task for every incoming request without a limit. Under a burst, that can turn demand into an unbounded backlog of pages competing for CPU and memory. Use a queue or equivalent admission control, set a maximum number of active jobs, and decide what happens when the queue is full: wait, reject, or return a job identifier for later retrieval.
#1 Best Overall
- 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 following Node.js example uses a small worker pool, reuses one browser process, and creates a fresh browser context for each job. It is a starting point, not a recommended concurrency value. Install Puppeteer with npm install puppeteer, save this as an ES module such as generate.mjs, and run node generate.mjs. The two example URLs and the limit of two workers are demonstration inputs only; replace them and determine the limit by testing your workload.
import puppeteer from 'puppeteer';
const jobs = [
{ url: 'https://example.com', file: 'example-1.pdf' },
{ url: 'https://example.org', file: 'example-2.pdf' },
];
// Demonstration limit only. Tune with representative load tests.
const concurrency = 2;
const queue = [...jobs];
const browser = await puppeteer.launch();
async function worker() {
while (queue.length) {
const job = queue.shift();
if (!job) return;
const context = await browser.createBrowserContext();
try {
const page = await context.newPage();
await page.goto(job.url, { waitUntil: 'networkidle2', timeout: 30_000 });
await page.pdf({
path: job.file,
format: 'Letter',
printBackground: true,
scale: 1,
timeout: 30_000,
waitForFonts: true,
});
console.log(`Created ${job.file}`);
} catch (error) {
console.error(`Failed ${job.url}:`, error);
} finally {
await context.close();
}
}
}
try {
await Promise.all(
Array.from({ length: Math.min(concurrency, jobs.length) }, () => worker()),
);
} finally {
await browser.close();
}
This example catches per-job failures so another queued job can proceed, and closes each context even when navigation or PDF generation fails. A production service should also record each job’s outcome and expose an intentional queue-full and cancellation policy. If the process is interrupted or the browser exits unexpectedly, the caller must be able to identify unfinished jobs and apply its retry policy without treating a partial output as success.
Choose output settings as part of the document contract
page.pdf() renders with print CSS media by default, waits for fonts by default, and returns a Promise<Uint8Array>. Define the required paper size, margins, scale, backgrounds, and timeout rather than relying on defaults. The documented defaults include Letter paper, scale 1, a 30,000 ms timeout, and waitForFonts: true. The complete option reference is at Puppeteer’s PDFOptions interface.
Rank #2
- 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.
- Print or screen appearance: For screen CSS media, call
await page.emulateMediaType('screen')beforepage.pdf(). Otherwise the PDF uses print media. - CSS page dimensions: Use
preferCSSPageSizewhen the document’s CSS@pagedimensions should take priority over API width, height, or format settings. - Colors and backgrounds: Set
printBackgroundwhen the output contract requires printed background graphics, then verify actual output rather than assuming screen colors will match. - Fonts and timing: Font readiness is enabled by default. If you change that behavior or use a navigation wait condition that does not reflect when the page is truly ready, validate the resulting files for missing fonts and incomplete content.
- Page geometry: Check page breaks, margins, scale, and page count against representative long and short documents. A successful promise alone does not confirm that layout is correct.
See the Page.pdf() reference for the method’s behavior. Choose settings based on the output users expect, not on a desire to maximize jobs per second.
Choose browser reuse and isolation deliberately
Puppeteer supports launching a browser or connecting to a running browser. It also supports browser contexts: cookies and local storage are not shared between contexts, and closing a context closes its pages. These are lifecycle and state-isolation tools, not evidence that one browser topology or a particular number of contexts is safe for every workload.
- Reuse a browser process: It avoids making each job responsible for starting and stopping a browser. Ensure cleanup is reliable and plan how the service detects and recovers from a browser that stops responding or exits.
- Use contexts where jobs need separate state: Separate contexts help prevent cookies and local storage from leaking between jobs. They still consume resources; benchmark the context-per-job approach against your workload.
- Recycle based on evidence: Decide whether and when to restart browsers using observed resource trends and failure behavior. The documentation does not establish a universal recycling interval.
Keep page and context cleanup in finally paths. A request that times out, a page that fails to load, or a PDF write that fails must not silently leave browser state occupying capacity. The supported lifecycle methods are covered in the browser management guide.
Rank #3
- 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.
Find a safe concurrency limit with representative tests
- Define the service targets. Set acceptable end-to-end latency, tail latency, memory and CPU use, failure rate, and output correctness before tuning.
- Build a representative job mix. Include the actual document sizes, page lengths, assets, fonts, and output settings. A test consisting only of trivial pages cannot establish capacity for more demanding PDFs.
- Increase concurrency in controlled steps. Keep the browser version and deployment environment fixed while comparing runs. Record queue wait time separately from rendering time so queue growth is visible.
- Stop increasing when targets fail. Look for resource saturation, worsening tail latency, more failures, or incorrect output. Choose a limit that retains headroom for normal variation rather than using the highest short-lived throughput point.
- Repeat after meaningful changes. Re-test when the deployed browser, document mix, assets, or PDF settings change; an earlier limit is not automatically valid for a changed workload.
There is no universal safe concurrency number in the reviewed Puppeteer documentation. The appropriate limit is specific to your deployment and workload.
Instrument the rendering path, not just the browser
Measure each job from admission through delivery, and separate queue delay, navigation or readiness time, PDF generation, and downstream storage or response time. On the host and process, observe CPU and memory alongside job volume, latency, and failures. This helps distinguish a rendering bottleneck from queueing or output delivery.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Puppeteer’s page.metrics() exposes diagnostic counters and durations including JSHeapUsedSize, Nodes, LayoutDuration, ScriptDuration, and TaskDuration. Compare these across document classes or releases to investigate expensive pages and regressions. They describe page-level activity; they do not establish service capacity by themselves. See the Metrics interface.
Rank #4
- 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
Use a PDF stream only when the output path benefits
page.pdf() produces a complete Uint8Array. Puppeteer also provides page.createPDFStream(), which returns a ReadableStream<Uint8Array>. A stream can fit an application that consumes or forwards output incrementally, but the API reference makes no promise of a specific memory or throughput improvement. Benchmark the whole path, including the destination store or HTTP response, before choosing it for performance reasons. See Page.createPDFStream().
Troubleshoot common production failures
- Jobs pile up while the service stays alive: Admission exceeds completed rendering capacity, or a subset of jobs takes much longer than the rest. Track queue wait and render duration independently, then lower admission or revisit the workload mix and capacity targets.
- Navigation times out: The page did not reach the chosen readiness condition within the timeout. Inspect the target’s loading behavior and decide what “ready” means for that document; do not simply raise the timeout without checking its effect on queue occupancy and end-to-end latency.
- PDF generation times out: Rendering did not finish within the configured limit. Identify whether a particular document class is responsible, validate its assets and layout, and tune timeout policy against service requirements.
- Fonts are missing or layout differs: Confirm fonts are available and ready before output, and check print versus screen media, CSS page dimensions, margins, and scale. Compare the generated file—not just the browser viewport—with the expected document.
- Background colors are absent: Check the print-background setting and the page’s print styling. Validate the resulting PDF because print CSS can intentionally differ from screen appearance.
- Memory or latency worsens under load: Reduce concurrency during diagnosis, inspect process and host metrics, and compare page-level metrics by document class. Do not assume a stream, a new context, or a browser restart will solve the issue without measuring the full path.
- State leaks between jobs: Use isolated contexts where independent cookies or local storage are required, and ensure the context closes after every job, including failures.
Or skip the browser setup
If the job is to capture a URL as an image or PDF rather than implement a custom Puppeteer rendering pipeline, ScreenshotNeo offers a one-request API. It is a website screenshot API and MCP server for developers; see ScreenshotNeo and its API documentation. This does not replace Puppeteer when you need your own browser lifecycle, arbitrary application logic, or a precisely controlled rendering service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
- Cookie and consent banners are accepted before capture, and 60+ known consent platforms, newsletter popups, and chat widgets are removed; each step can be turned off.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Responses indicate the page verdict and billing status in
X-Page-VerdictandX-Billedheaders. - An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for Claude, Cursor, and other MCP clients. - The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Every feature is available on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- 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.
Frequently Asked Questions
Can I use the same PDF settings for every document?
Only if every document has the same output contract. Keep per-document format and layout requirements explicit, and validate representative files when those requirements differ.
Does a successful PDF promise that the document is visually correct?
No. A completed render can still have unwanted page breaks, missing fonts, or incorrect print styling; correctness needs file-level validation against the expected result.
Should I use ScreenshotNeo instead of Puppeteer for every PDF job?
No. ScreenshotNeo is an alternative for capturing a URL through its API or MCP tools. Puppeteer is the fit when you need to operate and control your own browser-rendering workflow.
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.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →

