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.

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

When a Puppeteer PDF is missing text, images, colors, or entire sections, first inspect the page in the same browser context immediately before page.pdf(). Then check print-media CSS, asynchronous rendering, background-print settings, fonts, page ranges and geometry, and finally the deployed browser/container. Puppeteer’s Page.pdf() API states that it “Generates a PDF of the page with the print CSS media type,” so a page that looks correct on screen can legitimately produce different output.

Start with a controlled diagnosis

Do not change several PDF options at once. A missing foreground element, a CSS background, an unrendered React component, a font failure and a clipped page have different causes. Capture evidence in the same runtime that creates the failing PDF.

  1. Save the exact inputs: Puppeteer version, Chrome or Chromium version, operating system or container image, URL, viewport, PDF options and relevant environment variables.
  2. Inspect the DOM before printing: verify that the node exists, contains text or an image source, has a nonzero bounding box and is not hidden by display:none, visibility:hidden, opacity or clipping.
  3. Record failures: log request failures, HTTP errors, console errors and rejected application promises. A navigation event can finish while a client-side component is still empty.
  4. Compare a screenshot and the PDF: use the same page and browser context. If the screenshot is already wrong, fix loading or application state before adjusting PDF settings.

A useful temporary probe is:

const state = await page.evaluate(() => ({
  readyState: document.readyState,
  bodyText: document.body.innerText.length,
  fonts: document.fonts.status,
  images: [...document.images].map(i => ({src: i.currentSrc || i.src, complete: i.complete, width: i.naturalWidth})),
  target: (() => { const el = document.querySelector('#report'); if (!el) return null; const r = el.getBoundingClientRect(); return {text: el.textContent, width: r.width, height: r.height, display: getComputedStyle(el).display, visibility: getComputedStyle(el).visibility}; })()
}));
console.log(state);

Run this immediately before page.pdf(), not after navigation alone.

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

1. Make sure the content exists before PDF generation

Wait for application readiness, not only navigation

The official PDF guide demonstrates waitUntil: 'networkidle2', but that signal does not prove that every framework effect, API callback, chart, iframe or lazy component has completed. Add a page-specific readiness marker:

#1 Best Overall
HP Printer Paper | 8.5 x 11 Paper | Copy &Print 20 lb | 1 Ream Case - 500 Sheets| 92 Bright | FSC Certified | 200060
  • HP Papers is sourced from renewable forest resources and has achieved production with 0% deforestation in North America. Each ream is wrapped in a polyurethane coated paper wrapper to protect the cut sheets from moisture damage
  • Sheet size – 8.5 x 11; Thickness – 20 pounds; Brightness – 92 bright white
  • HP Copy&Print20 20 pounds printer paper is Forest Stewardship Council (FSC) certified and contributes toward satisfying credit MR1 under LEED (Leadership in Energy and Environmental Design)
  • All HP Papers provide premium performance on HP equipment, as well as on all other printer and copier equipment; 100% satisfaction guaranteed; ColorLok technology provides more vivid colors, bolder blacks and faster drying
  • Superior quality, reliability, and dependability for high-volume printing at home, at school and in the office; HP Copy&Print20 print and copy paper prevents yellowing over time to ensure a long-lasting appearance for added archival quality
await page.goto('https://example.com/report', {waitUntil: 'networkidle2'});
await page.waitForSelector('#report[data-ready="true"]', {timeout: 30000});
await page.evaluate(() => document.fonts.ready);
await page.pdf({path: 'report.pdf', printBackground: true});

Set the marker in your application only after the data request, image processing and layout work required for the document are complete. For lazy images, scroll or otherwise trigger the application’s loading behavior and confirm each image has a natural width before printing.

Check if an iframe or request is the real dependency

Content inside an iframe has its own load lifecycle. Wait for the frame’s URL or a selector within the frame, and inspect its request failures. Also verify that authentication cookies, authorization headers and same-origin policies are available in the PDF page’s browser context.

2. Resolve print-versus-screen CSS differences

Page.pdf() uses print media. Search every stylesheet and inline style for @media print rules that set display:none, visibility:hidden, alternate content, white text, changed colors or different layout. A section can be present in the DOM but intentionally removed for paper.

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

Test screen media as a diagnostic

await page.emulateMediaType('screen');
await page.pdf({path: 'screen-styled.pdf', printBackground: true});

If the missing material returns, you have confirmed a media-style discrepancy. Decide which output is correct: repair the print stylesheet for a real print document, or deliberately use screen media when the PDF must match the web view. Do not leave the test setting undocumented; it changes the document’s intended styling.

Inspect computed styles

const style = await page.$eval('#missing-section', el => {
  const s = getComputedStyle(el), r = el.getBoundingClientRect();
  return {display: s.display, visibility: s.visibility, opacity: s.opacity,
          color: s.color, background: s.backgroundColor,
          width: r.width, height: r.height};
});
console.log(style);

Look for a zero-sized box, a white-on-white color change, an off-screen transform, or an ancestor that hides overflow. Fix the CSS at its source instead of adding arbitrary delays.

Rank #2
Amazon Basics Multipurpose Copy Printer Paper, 8.5 x 11 Inches, 20 lb, 92 Bright, White, 1 Ream (500 Sheets), Jam-Free
  • 1 ream (500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing

3. Restore backgrounds without confusing them with images

Background graphics are disabled by default. If a logo, chart, color band or illustration is a CSS background, pass printBackground: true:

await page.pdf({path: 'report.pdf', printBackground: true});

The current PDFOptions reference lists printBackground defaulting to false. This option does not repair a failed foreground image request, a missing DOM node or a print rule that hides the element. Check the image’s URL, response status, CORS behavior and naturalWidth separately.

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

4. Check fonts and glyph coverage

Current Puppeteer documentation lists waitForFonts: true by default and describes waiting for document.fonts.ready. That wait cannot install a font that failed to download or is absent from a container.

  1. Inspect font requests in your request-failure and response logs.
  2. Run await page.evaluate(() => document.fonts.check('16px "Your Font"')) and inspect document.fonts.status.
  3. Verify the deployed image contains every required font file and that @font-face URLs are reachable from the browser.
  4. For Chinese, Japanese, Korean or other scripts, install fonts with the required language coverage. Puppeteer’s troubleshooting guide specifically calls out additional font files for these characters.

If you need to make the behavior explicit, retain the default and document it:

await page.pdf({path: 'report.pdf', waitForFonts: true});

When glyphs still differ, compare the actual installed fonts and fallback chain in local and production environments; increasing a timeout will not solve a missing font.

Rank #3
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 3 Reams (1,500 Sheets), 92 Bright White for Home Use
  • 3 ream case (1,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing

5. Verify page ranges, paper size and layout geometry

A section may exist but fall outside the requested range, be pushed onto an unexpected page or be clipped by dimensions and margins. Check these options together:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Option What to verify Documented behavior or default
pageRanges Includes the page containing the section Empty string means all pages
format Matches the intended paper size and orientation Takes priority over width and height
width/height Do not conflict with CSS @page assumptions Used when a format is not taking priority
preferCSSPageSize Whether CSS @page should control paper size Defaults to false; when true, CSS size takes priority
margin Content is not pushed outside printable space Applied around the page content
scale Text and boxes are not clipped or unexpectedly tiny Defaults to 1, constrained from 0.1 to 2

Use one source of truth for page size. For example:

await page.pdf({
  path: 'report.pdf',
  format: 'A4',
  landscape: false,
  margin: {top: '16mm', right: '14mm', bottom: '16mm', left: '14mm'},
  pageRanges: '',
  preferCSSPageSize: false,
  scale: 1,
  printBackground: true
});

Then compare the resulting page count and breaks with the browser’s print dialog using the same browser version. If CSS defines @page { size: ... }, test the opposite preferCSSPageSize choice rather than mixing conflicting declarations.

6. Compare local and deployed browser environments

A PDF that works on a laptop can fail in a container because Chrome shared libraries or fonts are missing, or because Puppeteer is paired with an unsupported external Chromium build. Record the Puppeteer package version and the browser’s reported version in both environments.

  • Install all shared libraries required by the Chrome build in the container.
  • Use the browser revision supported by your installed Puppeteer when supplying an external executable.
  • Copy the same font packages and certificate configuration used locally.
  • Run a small smoke-test page at deployment time and retain its PDF as an artifact.

The official troubleshooting documentation covers Docker dependencies and browser-version compatibility. The PDF guide and options reference reported version 25.12.0 at the time of writing; defaults can change, so verify the documentation for the version in your project.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Upload & Print 8.5x11 Custom PDF – 25 Sheets - High Resolution Full Color Printing – Premium Stock Options - Heavy Card Stock, Laminated, Etc. - Fastest Turnaround - Made in the U.S.A.
  • PREMIUM QUALITY: High-resolution full color printing on standard 8.5x11 inch sheets with professional-grade output and crisp, vibrant results
  • VERSATILE OPTIONS: Choose from multiple stock materials including paper, card stock, laminated, and double-thick variants to suit your specific needs
  • SAME-DAY SERVICE: Orders placed before 2 PM CST Monday through Friday qualify for same-day printing
  • CUSTOMIZATION: Simply upload your PDF design for personalized printing
  • AMERICAN MADE: Produced in USA facilities using premium stock, ensuring consistent quality and reliable delivery

7. Reduce the failure to a minimal reproduction

Strip the case to one HTML file that preserves the problematic media rule, font, image type, asynchronous data and PDF options. Save the DOM immediately before printing, then compare:

  • screen-media and print-media screenshots;
  • the browser print output and Puppeteer output;
  • the same script locally and in the deployed image;
  • full-page output and a narrowed pageRanges request.

A Puppeteer issue opened on 2022-11-08 for version 19.2.2 on macOS describes blank pages and pagination differences in one setup: issue #9228. It is useful historical evidence for reducing a reproduction, not proof of a universal current defect.

Common symptoms and targeted fixes

Symptom Likely cause Next check
Section absent but present on screen Print CSS hides or replaces it Inspect @media print; test emulateMediaType('screen')
Colors, logos or bands missing Background printing disabled Set printBackground: true
Text is blank, tofu or the wrong language glyphs Font request or installed-font failure Check document.fonts, requests and container packages
Charts or data blocks empty Application work continues after navigation Wait for a page-specific ready marker and inspect API errors
Only some pages appear pageRanges or pagination geometry Clear ranges; compare format, margins, scale and CSS @page
Works locally, fails in Docker Missing libraries, fonts or incompatible browser Align versions and install runtime dependencies
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 provides a website screenshot API and MCP server when you need a rendered capture without maintaining Puppeteer infrastructure. It accepts consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and each response reports the result in X-Page-Verdict and X-Billed headers. Its MCP tools—take_screenshot, get_page_info and capture_pdf—work with Claude, Cursor and other MCP clients.

For a one-call PDF or image request, see the ScreenshotNeo documentation. The same endpoint supports PNG, JPEG, WebP and PDF; options include full-page lazy-image loading, CSS-selector element capture, dark mode, device presets or custom viewports, retina scale, PDF paper settings and ranges, custom CSS or JavaScript, clicks, selector or network-idle waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, TTL caching, signed links, async webhooks and bulk capture of up to 100 URLs per call.

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.
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)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Every feature is on every plan: 1,000 shots per month are free with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

FAQ

Should I always use emulateMediaType('screen')?

No. Use it only when the PDF is intended to match screen styling. Otherwise repair the print stylesheet so print output remains intentional.

Best Value
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 5 Reams (2,500 Sheets), 92 Bright White
  • 5 ream case (2,500 sheets) of 8.5 x 11 white copier and printer paper for home or office use
  • Multipurpose letter size copy paper works with laser/inkjet printers, copiers and fax machines
  • Smooth 20lb weight paper for consistent ink and toner distribution; dries quickly and resists paper jams
  • Bright white paper (92 GE; 104 Euro) offers great contrast for crisp printing and vivid color
  • Virgin copy paper providing professional quality results; acid-free to prevent yellowing

Can networkidle2 guarantee complete content?

No. It is a navigation wait condition; application-specific rendering still needs its own readiness signal and DOM checks.

Does printBackground make every image appear?

No. It affects CSS backgrounds. Foreground images still require valid requests, accessible URLs and completed loading.

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

Where should I check first in a container?

Compare Puppeteer and browser versions, then verify Chrome shared libraries and the fonts required by the document.

Frequently Asked Questions

Why does the PDF differ from Chrome’s print preview?

Print preview may use different browser settings or a different version. Compare equivalent media type, paper size, margins, scale and browser version before changing application code.

What does an empty pageRanges value do?

In the current PDFOptions reference, an empty string means all pages.

Is a historical Puppeteer issue evidence that my version is broken?

No. Issue #9228 documents one blank-page and pagination report from a specific 2022 setup; reproduce the problem on your versions before drawing that conclusion.

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

Quick Recap

Bestseller No. 1
HP Printer Paper | 8.5 x 11 Paper | Copy &Print 20 lb | 1 Ream Case - 500 Sheets| 92 Bright | FSC Certified | 200060
HP Printer Paper | 8.5 x 11 Paper | Copy &Print 20 lb | 1 Ream Case - 500 Sheets| 92 Bright | FSC Certified | 200060
Sheet size – 8.5 x 11; Thickness – 20 pounds; Brightness – 92 bright white
$6.97
Bestseller No. 2
Amazon Basics Multipurpose Copy Printer Paper, 8.5 x 11 Inches, 20 lb, 92 Bright, White, 1 Ream (500 Sheets), Jam-Free
Amazon Basics Multipurpose Copy Printer Paper, 8.5 x 11 Inches, 20 lb, 92 Bright, White, 1 Ream (500 Sheets), Jam-Free
1 ream (500 sheets) of 8.5 x 11 white copier and printer paper for home or office use; Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$6.97
Bestseller No. 3
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 3 Reams (1,500 Sheets), 92 Bright White for Home Use
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 3 Reams (1,500 Sheets), 92 Bright White for Home Use
Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$23.99
Bestseller No. 5
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 5 Reams (2,500 Sheets), 92 Bright White
Amazon Basics Multipurpose Copy Printer Paper, 20 lb, 8.5 x 11 Inches, 5 Reams (2,500 Sheets), 92 Bright White
Virgin copy paper providing professional quality results; acid-free to prevent yellowing
$34.85

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.