Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11For a reliable Puppeteer PDF setup, first verify that your VPS runs a supported Debian or Ubuntu release on x64 or arm64 and has Node.js 22.12 or newer. Install puppeteer to download its compatible Chrome for Testing browser, ensure the download ran, install Linux libraries and fonts for the scripts in your documents, then generate and test a representative PDF. Current Puppeteer documentation identifies Chrome for Testing—not generic system Chromium—as the managed browser.
Check the VPS before installing
India describes the server’s location, not its operating system or package configuration. VPS images and provider setups vary, so check the actual machine rather than assuming a particular Ubuntu release, package mirror, or preinstalled browser.
As an Amazon Associate I earn from qualifying purchases.
- Check the distribution and release with
cat /etc/os-release. - Check the CPU architecture with
uname -m. Puppeteer’s current system requirements list Debian/Ubuntu Linux on x64 and arm64 for Chrome for Testing. - Check Node with
node --version. The current requirements page lists Node.js 22.12 or newer. See the Puppeteer system requirements and confirm them again when deploying, as supported versions change. - Identify the Linux user that will run the application. Puppeteer’s default browser cache is under that user’s
$HOME/.cache/puppeteer; installing as one user and running as another can make the browser appear missing.
Keep enough disk space for the downloaded browser and generated files, and enough memory for the browser processes used by your workload. The exact needs depend on the page and concurrency; no single VPS size is established for every workload.
Install Puppeteer and its managed browser
Use the package-managed browser for the simplest setup
The puppeteer package normally downloads a compatible Chrome for Testing build during installation. From your application directory:
#1 Best Overall
npm install puppeteer
If the install completes but browser download scripts were blocked by your package manager or deployment configuration, install the browser explicitly:
npx puppeteer browsers install
Check the installation guide for current installation behavior and cache configuration. The version mapping between Puppeteer and its supported browser is maintained on the supported browsers page. Avoid updating a separately managed browser without checking compatibility.
When you use system Chromium or puppeteer-core
Use puppeteer-core when you intend to manage the browser yourself; it does not provide the same automatic browser download as puppeteer. A distro-provided Chromium can also differ from Puppeteer’s managed Chrome for Testing. Set executablePath to the actual installed browser binary and verify that your Puppeteer version supports it. Do not assume a generic path such as /usr/bin/chromium exists on every image.
const browser = await puppeteer.launch({ executablePath: '/path/to/chrome-or-chromium' });
For managed installs, prefer Puppeteer’s browser installation workflow over guessing an executable path.
Rank #2
Install Linux libraries and fonts
Install browser dependencies on Debian or Ubuntu
Chrome requires native shared libraries in addition to Node packages. Puppeteer’s browser CLI offers --install-deps for Chrome dependencies on Debian and Ubuntu; it requires system package privileges. For example, run it with appropriate privileges on a compatible system:
sudo npx puppeteer browsers install chrome --install-deps
Check the current browser CLI documentation and install options for syntax and platform limits. This is not a provider-neutral dependency installer and should not be copied as a fix for every Linux distribution.
Puppeteer’s troubleshooting guide lists Debian/Ubuntu dependencies that include GTK, NSS, fontconfig, Pango, and fonts-liberation. Package names and availability can vary across releases. If Chrome reports a missing shared library, inspect the actual binary and error rather than installing an arbitrary list from an older guide:
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →ldd /path/to/chrome | grep 'not found'
Replace the path with the browser executable being launched. Install the package that provides each missing library for your OS release, then repeat the check.
Rank #3
- HP MicroServer Gen10 Plus Tower Server for Business with Microsoft Windows Server 2019 OS!
- Intel Xeon E-2224 Quad-Core 3.4GHz 8MB CPU, Up To 4.6GHz Turbo
- 32GB (2 x 16GB) DDR4 PC4-21300 2666MHz Unbuffered Memory
- 16TB (4 x 4TB) 7.2K 6Gb/s SATA 3.5" HDDs in RAID
- Hard drives and memory upgrades included separately NOT installed, installation required.
Choose fonts for the document’s scripts
Font installation is separate from browser installation. A PDF can be created successfully while displaying empty boxes, fallback glyphs, or inconsistent line breaks if the server lacks fonts covering the page’s characters. Install fonts that cover the actual content, including any Indian-language scripts used by the documents. A generic font package does not guarantee coverage for every script. Puppeteer’s troubleshooting page notes that non-Latin scripts may need additional fonts; verify glyph coverage with representative pages.
After installing fonts, restart the browser process and generate a test PDF containing the languages, punctuation, and symbols used in production. Check that text is visible and that line wrapping and page count are acceptable.
Generate a PDF with Puppeteer
This CommonJS example uses the browser downloaded by puppeteer. Save it as make-pdf.cjs and run node make-pdf.cjs. Replace the URL and output path for your application.
Recommended Free Tools
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com', {
waitUntil: 'networkidle0',
timeout: 60000,
});
await page.pdf({
path: 'page.pdf',
format: 'A4',
printBackground: true,
waitForFonts: true,
margin: { top: '15mm', right: '15mm', bottom: '15mm', left: '15mm' },
});
} finally {
await browser.close();
}
})().catch((error) => {
console.error(error);
process.exit(1);
});
Page.pdf() renders using print CSS. Its options include paper format or dimensions, margins, page ranges, background printing, and whether CSS page-size declarations take precedence. The current PDF options document waitForFonts as true by default; setting it explicitly makes the intended behavior clear, but it cannot supply missing fonts. See the PDFOptions reference. A PDF generation guide is also available at Puppeteer’s next documentation; because that URL is a next-version page, verify details against the stable API for your installed release.
Rank #4
Decide which page-size rule should win
- Use
format, such asA4, when the application should set a standard paper size through the API. - Use
preferCSSPageSize: truewhen the document’s CSS@pagedimensions should control the output instead of being scaled to the API’s paper size. - Set margins deliberately. A layout designed edge-to-edge may need smaller or zero margins; ordinary documents often need printable margins.
- Set
printBackground: truewhen colors or background images are part of the intended design. - Use
pageRangeswhen only specified pages should be emitted. Validate the range against the final rendered page count.
Troubleshoot common failures
“Could not find Chrome” or browser not found
- Cause: The package installation skipped its browser download, the cache belongs to another user, or a custom cache directory differs between install and runtime.
- Fix: Run
npx puppeteer browsers installas the deployment user, confirm the documented cache location, and keep install and runtime users/configuration aligned. If usingpuppeteer-core, configure a validexecutablePath.
Chrome exits because a library is missing
- Cause: A required shared library is absent or its package name differs on the VPS release.
- Fix: Use
ldd /path/to/chrome | grep 'not found', then install the matching OS package. On Debian or Ubuntu, the Puppeteer CLI dependency installer is another option when run with the required privileges.
Sandbox startup fails
Do not make --no-sandbox the default workaround. Puppeteer recommends Chrome’s sandbox and strongly discourages disabling it. First inspect the actual launch error, runtime user, OS release, and security policy. Puppeteer documents an Ubuntu 23.10-and-later AppArmor issue that can affect Chrome for Testing user namespaces and sandbox startup. The relevant remediation depends on the image’s policy; consult the current troubleshooting guidance rather than weakening isolation without diagnosis.
PDF has missing glyphs, boxes, or unexpected line breaks
- Cause: The server lacks a font covering the page’s scripts, or the page was captured before web fonts finished loading.
- Fix: Install suitable fonts, test representative multilingual text, and wait for fonts before printing.
waitForFontsis documented as true by default in current PDF options, but a missing font must still be installed or otherwise made available.
PDF is blank, incomplete, or missing backgrounds
- Cause: Navigation ended before the page’s content was ready, content loads on a delay, or print settings omit backgrounds.
- Fix: Choose a navigation readiness condition that fits the site, allow for its client-side rendering, and set
printBackground: trueif needed. Test pages with the same loading behavior as production; a network-idle condition may not suit every application.
Performance, reliability, and cost considerations
PDF generation launches browser work, so measure memory use and render time with representative pages and expected concurrency on your own VPS. Reuse browser processes where appropriate for a service, while isolating pages and handling crashes; close pages and browsers in cleanup paths as in the example. The available official guidance does not establish a universal VPS size, Indian-region latency, or provider-specific cost. Compare VPS options using their documented OS images, architecture, package-install permissions, available memory and storage, region, and current price.
For reproducible deployments, pin application dependencies and control when the browser version changes. Keep Puppeteer and its managed browser paired unless you intentionally manage compatibility yourself. Revalidate fonts and PDF output after OS, browser, or font package updates.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsOr skip the browser setup:
If you only need a screenshot or PDF from a URL, ScreenshotNeo is a hosted website screenshot API and MCP server. One GET request can return PNG, JPEG, WebP, or PDF output; its clean-shot workflow accepts consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture, with each step configurable.
Example cURL request (see the ScreenshotNeo documentation):
Best Value
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; responses identify the page verdict and billing status in X-Page-Verdict and X-Billed headers. The MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Sign up free for 1,000 screenshots a month, with no card required.
Frequently Asked Questions
Does Puppeteer install Chromium automatically?
With the `puppeteer` package, installation normally downloads a compatible Chrome for Testing browser. Current Puppeteer does not describe its managed default simply as generic Chromium.
Can I use the VPS’s existing Chromium binary?
Yes, if you manage the browser yourself: use a compatible Puppeteer setup and set `executablePath` to the actual binary. Check version compatibility rather than assuming any system Chromium will work.
Will `fonts-liberation` cover Hindi and every other Indian language?
No single font package should be assumed to cover every script. Install and test fonts for the languages and glyphs present in your PDFs.
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.

