What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
To fix blank Puppeteer PDFs on Heroku, first determine whether Chromium failed to launch, the page was printed before it had content, or the PDF omitted only print backgrounds or fonts. These are different failures with different fixes. Check the generated file, the deployed browser setup, page readiness, and PDF options in that order; there is no single cause established for every app.
Identify what “blank” means
Before changing buildpacks or adding delays, classify the output. A file that is missing or invalid points to a different stage than a valid PDF whose page has no text. Save a diagnostic screenshot and keep the relevant launch and navigation errors while investigating.
- No file, zero-byte file, or unreadable PDF: investigate whether PDF generation completed and whether the application wrote the returned bytes to the intended path.
- Valid PDF with empty pages: check that Chromium launched, navigation succeeded, and the page had rendered its content before
page.pdf(). - Text or foreground content appears, but colors or background images do not: inspect
printBackgroundand the page’s print CSS. - Only certain characters or writing systems are missing: investigate installed fonts and glyph coverage.
A successful browser launch does not prove that the page was ready to print. Conversely, a missing Chromium executable or shared library is a launch problem, not a print-style problem.
Use a known-good PDF flow and verify page readiness
Puppeteer’s PDF guide demonstrates navigating before printing, using waitUntil: 'networkidle2', and closing the browser when finished. networkidle2 is a useful baseline, not proof that every application has finished rendering: a single-page app may hydrate, fetch data, or reveal content after network activity settles. Check the page’s final DOM or a diagnostic screenshot, and wait for an application-specific ready condition when needed. Puppeteer documents that Page.pdf() waits for fonts by default. See the Puppeteer PDF generation guide.
#1 Best Overall
- 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
This example writes the PDF only after navigation and an explicit selector check. Replace the URL and selector with values that match your app. It is intentionally diagnostic: if the selector never appears, the error helps distinguish an unready page from an empty PDF.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],
});
try {
const page = await browser.newPage();
page.setDefaultNavigationTimeout(60000);
const response = await page.goto('https://your-app.example/report', {
waitUntil: 'networkidle2',
timeout: 60000,
});
if (!response || !response.ok()) {
throw new Error(`Navigation failed: ${response ? response.status() : 'no response'}`);
}
await page.waitForSelector('[data-report-ready="true"]', { timeout: 30000 });
// Keep this while diagnosing; compare it with the PDF.
await page.screenshot({ path: '/tmp/report-before-pdf.png', fullPage: true });
const pdf = await page.pdf({
path: '/tmp/report.pdf',
format: 'A4',
printBackground: true,
waitForFonts: true,
});
if (!pdf || pdf.length === 0) {
throw new Error('Puppeteer returned an empty PDF buffer');
}
} finally {
await browser.close();
}
})();
For a CommonJS project, install and import the Puppeteer package used by your app. If your project uses ES modules, adapt the import syntax to its module configuration. Replace the example readiness selector with an element that appears only after the actual report data is rendered. A fixed sleep can be useful as a short diagnostic, but it is not a reliable universal readiness test.
Check Chromium launch and Heroku dependencies
If the deployed app cannot start Chromium, inspect the full launch error and confirm the executable and its required system libraries exist in the deployed environment. Puppeteer’s Heroku troubleshooting guidance says additional dependencies are needed, recommends a Puppeteer Heroku buildpack, and shows --no-sandbox in launch arguments. Treat the buildpack recommendation as third-party deployment guidance, not a guarantee that one configuration fits every Heroku app.
The example above uses --no-sandbox and --disable-setuid-sandbox, matching the common deployment pattern shown in Puppeteer’s Heroku guidance. Disabling Chromium’s sandbox has security implications; do not treat it as a universal safe setting. Follow the deployment environment’s security requirements and use it only where the runtime requires it.
Recommended Free Tools
Heroku supports both classic buildpacks for Cedar-generation apps and Cloud Native Buildpacks (CNBs) for all app generations, with different configuration paths. Its buildpacks documentation, last updated September 11, 2026, also says third-party buildpacks are unsupported by Heroku and advises inspecting their source before use. Check which buildpack model your app uses and confirm that the instructions you follow apply to it.
Record the deployed browser configuration
- Record the installed Puppeteer version and the Chromium executable path and version used in deployment.
- Inspect the Heroku stack, buildpack order, build logs, and runtime launch errors.
- Compare launch arguments between local and deployed execution.
- Do not assume a version combination is supported merely because it worked locally; the available guidance does not establish one universal Puppeteer–Chromium–Heroku version matrix.
Check Puppeteer’s browser cache when Chromium is missing
A browser cache that exists during a build may not be available in the deployed slug at runtime. The jontewks Puppeteer Heroku buildpack listing describes a cache-location change for Puppeteer v19 and later and documents using a heroku-postbuild script to move the cache into the app directory. This is specific to that buildpack and its configuration; verify it against the Puppeteer version and cache path your app actually uses rather than adding it as a general Puppeteer requirement.
Rank #2
- 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⁴
The same buildpack listing identifies clearing the Heroku build cache as a possible remedy for Chrome startup or missing-library errors. Try that only when the symptoms point to stale cache or missing dependencies, then rebuild and check the logs. Clearing a cache will not make a page that renders too early become ready to print.
Prove the page has content before printing
When Chromium launches and navigation completes but the PDF is empty, check the rendered page rather than changing the browser installation first. Record the navigation response, inspect the expected text or DOM element, and take a screenshot immediately before page.pdf(). Compare that screenshot to the PDF:
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →- Screenshot is empty too: investigate the URL, redirects, application errors, authentication, delayed API requests, and the app’s real readiness condition.
- Screenshot has content, PDF does not: inspect print CSS, PDF options, and whether the visible content is hidden or altered for print.
- Some data is absent from both: verify that the page’s data request succeeded and that your readiness selector is tied to completed data rendering, not merely initial page load.
The Puppeteer guide’s networkidle2 example is a starting point. For applications that render after an API response or client-side hydration, wait for a meaningful element or application state. Avoid treating a longer fixed delay as a guaranteed fix: it can mask timing issues, waste runtime, and still fail under different load conditions.
Inspect PDF options, print CSS, and fonts
Puppeteer’s current PDFOptions reference lists printBackground as false by default and waitForFonts as true. It also documents paper format, page ranges, timeout, and the precedence of CSS page size. Check the documentation for the release matching your installed package because these APIs and defaults can change.
| What is missing | What to inspect | Practical check |
|---|---|---|
| Background colors or images only | printBackground and print styles |
Set printBackground: true and inspect @media print rules. |
| Text and foreground content too | Navigation, rendering readiness, runtime errors, and PDF generation | Compare the pre-PDF screenshot and DOM with the generated file. |
| Unexpected page size or clipped content | format, CSS @page size, margins, and page ranges |
Check whether CSS page-size settings take precedence for your chosen options. |
| Missing Chinese, Japanese, or Korean glyphs | Fonts available in the deployed environment | Check installed font coverage; Puppeteer’s Heroku guidance notes that a buildpack with additional fonts may be required. |
Do not assume printBackground: true repairs an entirely empty page: it controls background printing, not whether your app loaded content. Likewise, waitForFonts being enabled by default does not install missing font files or add glyphs the system font set does not contain.
Diagnose the pipeline in order
- Classify the artifact. Confirm the file exists, has nonzero size, opens as a PDF, and has the expected page count. Determine whether text is absent or only backgrounds and styling are missing.
- Compare local and deployed execution. Record Puppeteer version, Chromium path and version, Heroku stack/buildpack setup, and launch arguments.
- Verify browser launch. Inspect deployment logs and confirm required Chromium dependencies are installed. Apply Heroku-specific launch or buildpack guidance only when it fits your app’s setup.
- Check the browser cache. If the executable is missing, compare your actual cache location and Puppeteer version with the instructions for the buildpack in use. Clear and rebuild only when the symptoms support a cache or dependency problem.
- Check readiness. Verify the final URL, navigation response, rendered DOM, expected text, and diagnostic screenshot before printing.
- Inspect print behavior. Review
printBackground, fonts, format, page ranges, margins, and print CSS against the installed Puppeteer version’s API documentation. - Retain diagnostics and close resources. Keep the launch/navigation error and screenshot with the failing output while debugging, then close the browser in a
finallyblock as in the example.
Common errors and fixes
“Could not find Chrome” or executable launch failure
The deployed app may not have a usable browser at the expected path, or the browser cache may not have made it into the slug. Confirm the executable path and cache location for the installed package and deployment configuration. If using the jontewks buildpack, check its version-specific cache instructions rather than assuming they apply to every setup.
Rank #3
- 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.
Missing shared library or browser exits at startup
This points toward deployment dependencies or a mismatched browser environment, not print CSS. Read the complete runtime error and build logs, verify the needed dependencies for your chosen Heroku stack, and assess the applicable buildpack guidance. If using a third-party buildpack, inspect its source and remember that Heroku does not support third-party buildpacks.
PDF is valid but empty while the screenshot is empty
Check whether navigation reached the intended page, whether authentication or redirects changed the destination, whether application data loaded, and whether a JavaScript error prevented rendering. Wait for an app-specific ready condition, then capture the diagnostic screenshot again.
Screenshot is correct but the PDF loses colors or background images
Set printBackground: true and inspect print-specific CSS. Compare other PDF settings with the options supported by your installed Puppeteer version.
Only CJK characters or selected symbols are missing
Check that the deployed environment has fonts with the required glyphs. Puppeteer’s Heroku troubleshooting page notes that Chinese, Japanese, or Korean rendering may require a buildpack that supplies additional fonts.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsIt works locally but not after deployment
Compare the deployed stack, browser executable and version, buildpack configuration, cache path, fonts, and launch arguments with local execution. A successful local PDF does not establish that the deployed environment contains the same browser dependencies or fonts.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Performance and reliability considerations
PDF generation requires launching a browser, loading the page, waiting for its content, and printing. A readiness check should be specific enough to prevent premature output without waiting indefinitely. Set navigation and selector timeouts deliberately, log the stage that failed, and close the browser even when navigation or printing throws. Puppeteer’s example closes the browser after PDF generation; the finally pattern above also closes it when an earlier step fails.
Rank #4
- 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
Keep diagnostic screenshots and logs during investigation, but avoid logging credentials, authorization headers, or sensitive page contents. Do not add repeated cache-clearing builds or longer delays without evidence: neither addresses every failure mode, and extra waits can increase job duration without fixing missing dependencies, absent fonts, or print CSS.
Or skip the browser setup
If your task is to capture a website as an image or PDF rather than generate a PDF inside your own Puppeteer deployment, ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. A single GET request can return a PNG, JPEG, WebP, or PDF. For this Heroku how-to, the Puppeteer diagnosis above remains the right path when your own application must render its page and control its print workflow.
cURL example, using the documented endpoint and parameters (see the ScreenshotNeo API documentation):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Replace YOUR_API_KEY and the target URL with your own. The corresponding Python example is:
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)
And 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}`);
ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf tools 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 shots.
Sign up for ScreenshotNeo free: 1,000 screenshots a month, no card required.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC 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 & 11Frequently Asked Questions
Does networkidle2 guarantee that a Puppeteer page is ready to print?
No. It is a documented navigation example and a useful baseline, but client-side hydration or delayed application data may require waiting for an app-specific ready condition.
Does Puppeteer’s default PDF behavior include page backgrounds?
No. The PDFOptions reference lists printBackground as false by default; set it to true when background graphics are needed.
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.

