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 →Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
If an element is missing from a Puppeteer PDF, first check whether it exists in the page before calling page.pdf(). If it does, inspect its styles with print media active: PDF generation uses print CSS by default, and print rules can hide or reposition content. For a missing CSS background, set printBackground: true. Then verify that the page’s content and fonts are ready and that PDF page size, margins, and scale are not clipping or moving the element.
Diagnose whether the element is absent, hidden, or misplaced
Do not start by changing several PDF options at once. Check the page immediately before PDF generation. An element that is not in the DOM points to navigation, data loading, or application rendering. An element that exists but has no visible box points to CSS or layout. An element with a visible box may still be clipped, pushed onto another page, or outside the printable area.
Inspect the element and its ancestors
This helper reports whether a selector matched, its text, key computed styles, and its bounding rectangle in the current viewport:
const selector = '.report-total';
const state = await page.$eval(selector, el => {
const s = getComputedStyle(el);
const r = el.getBoundingClientRect();
return {
text: el.textContent.trim(),
display: s.display,
visibility: s.visibility,
opacity: s.opacity,
width: r.width,
height: r.height,
x: r.x,
y: r.y,
scrollWidth: el.scrollWidth,
scrollHeight: el.scrollHeight
};
});
console.log(state);
Replace .report-total with the selector for the missing content. If $eval throws because no element matches, the node is absent at that moment; investigate conditional rendering, failed data requests, or whether the page is still loading. If it matches, inspect relevant ancestors too: overflow: hidden, a zero-sized parent, opacity, transforms, or positioning can make a child effectively invisible or clipped.
#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
Check print CSS before changing PDF options
Puppeteer’s Page.pdf() renders using the print CSS media type by default. A component visible on screen may therefore be hidden, repositioned, or restyled by an @media print rule. Check the Page.pdf() documentation and search the page’s stylesheets for print rules affecting the element or its ancestors.
Inspect the element as print content
Set print media explicitly before inspecting computed styles so the diagnostic matches PDF rendering:
await page.emulateMediaType('print');
const printState = await page.$eval('.report-total', el => {
const s = getComputedStyle(el);
const r = el.getBoundingClientRect();
return {
display: s.display,
visibility: s.visibility,
opacity: s.opacity,
position: s.position,
overflow: s.overflow,
width: r.width,
height: r.height,
x: r.x,
y: r.y
};
});
console.log(printState);
Look for print rules such as display: none or visibility: hidden, as well as changed positioning, overflow, or page-break behavior. Fix the print stylesheet if the content belongs in the PDF. For a screen-style PDF, you can instead select screen media before generating it:
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 & 11await page.emulateMediaType('screen');
await page.pdf({ path: 'output.pdf' });
This chooses the screen media rules; it does not make a screen layout automatically suitable for paper. Content may still overflow or paginate poorly.
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⁴
Turn on background printing only for missing backgrounds
The documented printBackground default is false. If the absent item is drawn with CSS background or background-image, enable it:
await page.pdf({
path: 'output.pdf',
printBackground: true
});
This option prints CSS background graphics. It will not restore a DOM element removed by print CSS, an image that failed to load, or content outside the printable page. For PDF option behavior and defaults, see Puppeteer’s PDFOptions interface.
Wait for the page’s real render-complete condition
Navigation finishing does not necessarily mean an application has finished rendering. A client-side app may fetch data after navigation, add content after a state update, or render charts and images later. Puppeteer’s PDF generation guide demonstrates using waitUntil: 'networkidle2', but a quiet network is not proof that the specific content you need is ready.
Wait for a meaningful selector or app signal
Prefer a selector that appears only after the report is populated, or a readiness flag your application sets when rendering finishes. Here is a complete example using a page-specific selector:
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.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
page.on('console', msg => console.log('PAGE:', msg.type(), msg.text()));
page.on('pageerror', error => console.error('PAGE ERROR:', error));
page.on('requestfailed', request => {
console.error('REQUEST FAILED:', request.url(), request.failure()?.errorText);
});
await page.goto('https://example.com/report', {
waitUntil: 'networkidle2'
});
await page.waitForSelector('[data-report-ready="true"]', {
timeout: 15000
});
await page.emulateMediaType('print');
await page.evaluate(() => document.fonts.ready);
await page.pdf({
path: 'output.pdf',
printBackground: true,
preferCSSPageSize: true
});
} finally {
await browser.close();
}
})();
Replace the example URL and readiness selector with values from your app. If the app exposes a global flag instead, wait for it using page.waitForFunction(() => window.reportReady === true). Keep a timeout so a broken readiness condition fails clearly rather than leaving a job waiting indefinitely. Puppeteer’s Page class documents navigation and page-waiting APIs.
Check font readiness and font failures
Puppeteer’s PDF options document waitForFonts as enabled by default. That wait does not guarantee a remote font request succeeded or that the runtime has the expected font available. Check failed requests and browser console messages; confirm that the intended font is actually applied rather than silently falling back. You can wait for the document’s font set explicitly with await page.evaluate(() => document.fonts.ready), as in the example. If the issue remains, inspect the font’s status in the page and verify its URL is reachable from the machine generating the PDF.
Check paper size, margins, scale, and page breaks
An element can exist and be visible in the DOM but still fall outside the PDF’s printable region. Compare the CSS @page rules with the PDF options: paper format or explicit width and height, margins, scale, and preferCSSPageSize. Puppeteer documents preferCSSPageSize as false by default, so the PDF paper setting can take priority over CSS page size and cause content to be scaled to fit.
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 problemsWhen CSS page dimensions are authoritative, try preferCSSPageSize: true. If you set PDF dimensions directly, make sure they agree with the intended layout. Change one geometry setting at a time and inspect where the element went: another page, beyond an edge, or under an overflow clip. Also review print-specific page breaks and fixed-height containers; a section forced to a new page can look missing if you only inspect the first page.
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
For extra or blank pages, treat pagination as a layout problem distinct from a missing DOM node. A historical Puppeteer report documents an extra/blank-page issue, but it is not evidence that current releases share one universal bug: Puppeteer issue #589. Reproduce the behavior with your installed Puppeteer and browser versions before applying a workaround.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Use this troubleshooting sequence when the first checks do not solve it
- Confirm the node exists. Query it before
page.pdf(); if it is absent, debug application data and rendering rather than PDF styling. - Compare screen and print. Inspect computed styles with print media active, then check print-only rules and ancestor clipping.
- Identify the paint type. If it is a CSS background, enable
printBackground; if it is an image or other element, check its request and DOM state. - Verify readiness and assets. Wait for a meaningful app selector or flag, then check failed network requests and font loading.
- Inspect the whole PDF. Search all pages for the content and compare CSS page sizing, PDF dimensions, margins, scale, and page-break rules.
- Reduce the case. Try a minimal page with the same relevant CSS, font, browser/Puppeteer setup, and PDF options. Capture console errors, page errors, failed requests, and response status information.
If behavior is unusual, record whether the run uses standard headless Chrome or headless shell. The Page API documentation notes that headless shell navigation behavior can differ in some situations. Also record the Puppeteer package and browser versions: documentation and defaults can change, so check them against the environment producing the PDF.
Or skip the browser setup
If what you need is a clean visual capture of a webpage rather than a paginated, selectable-text PDF, ScreenshotNeo can return an image with one GET request. It is not a replacement for diagnosing a custom Puppeteer PDF layout. Its API accepts a URL and can return PNG, JPEG, WebP, or PDF; see the ScreenshotNeo API documentation for parameters and response details.
Recommended Free Tools
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/report -o shot.webp
ScreenshotNeo accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan.
Frequently Asked Questions
Why does a PDF omit an image even though the image element is in the DOM?
Check whether its network request succeeded and whether its box is visible under print media; a present image node can still have a failed source, hidden style, or clipped ancestor.
Does network idle guarantee that a Puppeteer page is ready to print?
No. Use it as a navigation condition if useful, but wait for an application-specific selector or readiness flag that means the content you need has rendered.
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.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.

