If a Puppeteer PDF has missing or hard-to-read text, first compare the page’s default print rendering with its screen rendering. page.pdf() uses print media by default, so print-specific CSS and print color handling are high-priority checks—not guaranteed explanations. Then check PDF background options and whether the intended fonts and glyphs are available. A successful PDF with invisible text is a different problem from page.pdf() throwing an error.
First identify which problem you have
Before changing CSS or browser settings, establish whether Puppeteer created a PDF at all. If the call throws or times out, investigate that failure separately. If it returns a PDF but text is absent, clipped, transparent, or too low-contrast to read, compare the rendered page and PDF output.
- PDF creation failed: record the error, Puppeteer and Chrome/Chromium versions, operating system, and whether the run is headless or headful.
- PDF exists but text looks wrong: start with print-versus-screen CSS, color handling, backgrounds, and fonts.
There is no universal fix established for every invisible-text symptom. A useful diagnosis reproduces the affected page with the same deployed browser build and PDF options.
Compare print and screen rendering
Puppeteer’s page.pdf() renders using the print CSS media type by default. A site may therefore look correct in a normal browser window but render differently when printed: @media print rules can change colors, visibility, opacity, clipping, or layout.
#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
Generate one PDF with the default print media and another after calling page.emulateMediaType('screen'). The screen version is a diagnostic comparison, not automatically the right production output: it may not have the pagination or print layout the document needs.
const printPdf = await page.pdf({ path: 'print.pdf' });
await page.emulateMediaType('screen');
const screenPdf = await page.pdf({ path: 'screen.pdf' });
Inspect the page’s print rules for changes to text color, opacity, visibility, clipping, positioning, and layout. If screen-media output restores the text, narrow the problem to a difference introduced by print rendering; then correct the relevant print styles or decide deliberately to generate using screen media.
Check text and print color handling
Puppeteer documents that PDF generation modifies colors for printing by default. If text is technically present but blends into its background, inspect both foreground and background colors in the print styles. A white text color that was meant for a dark screen background, for example, can become unreadable if the print output does not preserve that background.
To test exact color adjustment, add -webkit-print-color-adjust: exact to the relevant print CSS. Apply it narrowly while diagnosing and verify the result in the actual PDF; it is not a guaranteed cure for every missing-text issue.
@media print {
.report-content {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
Compare the result against the unmodified output. If the text remains missing, continue through the other checks instead of treating color adjustment as proof of the root cause.
Verify PDF background options
By default, Puppeteer’s printBackground option is false. If the page depends on CSS background graphics for contrast, try enabling it. Also check omitBackground: its default is false, while enabling it removes the default white background and permits transparency. That can be intentional, but it may make expected text contrast disappear in the viewer or downstream workflow.
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⁴
| Option | Documented default | What to check |
|---|---|---|
printBackground |
false |
Try true when the design relies on CSS background graphics. |
omitBackground |
false |
Ensure it is not enabled unintentionally if an opaque white page is expected. |
The waitForFonts default is true. These defaults are documented in Puppeteer’s PDFOptions reference version 25.12.0; check the reference matching the version installed in your project before relying on defaults.
A minimal options test could look like this:
const pdf = await page.pdf({
path: 'diagnostic.pdf',
printBackground: true,
omitBackground: false,
waitForFonts: true,
});
Change one setting at a time and retain each output. If the page was meant to have a transparent background, do not simply force an opaque one as a permanent fix; determine which background behavior the document actually requires.
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 problemsCheck font loading and glyph coverage
Puppeteer’s PDF guide says page.pdf() waits for fonts by default, and the PDFOptions reference lists waitForFonts with a default of true. That makes a premature PDF call less likely by default, but it does not establish that every font file loaded successfully or contains every character in the page.
Confirm the intended font files are accessible in the rendering environment and that the chosen font includes the glyphs for the text that disappears. Compare affected characters with ordinary letters: if only particular symbols or scripts fail, glyph coverage is a useful line of investigation. Check any project override of waitForFonts as well. Do not assume a font problem explains all invisible-text cases.
Use a controlled Puppeteer reproduction
For a reproducible comparison, save the artifacts and record the configuration that produced each one. This example deliberately writes both print-media and screen-media PDFs, then writes a print version with CSS background graphics enabled:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
// Default PDF media is print.
await page.pdf({
path: 'diagnostic-print.pdf',
printBackground: false,
omitBackground: false,
waitForFonts: true,
});
// Compare screen CSS against the default print rendering.
await page.emulateMediaType('screen');
await page.pdf({
path: 'diagnostic-screen.pdf',
printBackground: false,
omitBackground: false,
waitForFonts: true,
});
// Test whether CSS background graphics affect contrast.
await page.emulateMediaType('print');
await page.pdf({
path: 'diagnostic-backgrounds.pdf',
printBackground: true,
omitBackground: false,
waitForFonts: true,
});
} finally {
await browser.close();
}
})();
Replace the example URL with the affected page. Use the same Puppeteer package, Chrome/Chromium build, operating system, and relevant PDF options as the failing or unreadable job. The sample’s networkidle0 navigation condition is not a universal readiness guarantee for every site; if the page loads content later, use the readiness condition appropriate to that application before capturing.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.
Keep page sizing and scaling constant
When comparing artifacts, record options such as format, scale, and preferCSSPageSize. These affect page size or scaling and can change where content lands, even though the documented material does not identify them as causes of invisible text. Changing them between test runs makes the comparison less useful.
Once you find a configuration that restores legibility, test it on the actual document set and inspect all pages. A fix that helps one page may expose a different layout or contrast issue on another.
Troubleshoot by symptom
The PDF is readable in screen media but not print media
Inspect @media print declarations for text color, opacity, visibility, clipping, and layout changes. Correct the offending print rule if the document needs print styling. Use page.emulateMediaType('screen') only if screen styling is the intended output.
Text is present but blends into the page
Compare foreground and background colors and test -webkit-print-color-adjust: exact in the relevant print styles. If the design uses CSS backgrounds to provide contrast, test printBackground: true.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Text appears only over a background that is missing
Check whether printBackground is still at its default of false. Also verify that omitBackground has not been enabled when the document is expected to have an opaque white page.
Only some letters, symbols, or scripts are missing
Verify that the intended font loaded in the rendering environment and supports those glyphs. Puppeteer waits for fonts by default, but that does not prove the correct font file or glyph was available.
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
page.pdf() throws an exception
Capture the exact error and your Puppeteer, Chrome/Chromium, operating-system, and headless/headful details. Do not treat a historical error as current general compatibility guidance. Puppeteer issue #6220, opened on 2020-07-15, describes Puppeteer 5.1.0 on Windows 10 with Chrome 84 returning “Protocol error (Page.printToPDF): PrintToPDF is not implemented.” That report concerns a PDF-generation failure in that old setup; it does not explain a current PDF that is created but has invisible text.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Record enough detail to reproduce the result
For each artifact, keep a short record of the page URL or minimal reproduction, Puppeteer version, Chrome/Chromium version, operating system, headless or headful mode, media type, and PDF options. Save the print and screen outputs separately. If the problem cannot be reduced to a small HTML/CSS case, the version and option record still helps distinguish a rendering difference from a change in the source page.
Or skip the browser setup
If you need a clean visual capture of the page while you investigate, ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. It is not a Puppeteer PDF debugging switch; use it as a separate capture path to inspect the page. The API can return a clean screenshot or PDF, and its cleanup controls can be turned off individually. See the ScreenshotNeo site and API documentation.
This cURL request captures the target URL as a WebP image:
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, newsletter popups, and chat widgets are removed before the shot.
- Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers report the page verdict and billing status.
- An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents and MCP clients. - The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Every feature is available on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Does page.pdf() use print or screen CSS by default?
It uses the print CSS media type unless you emulate another media type before generating the PDF.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Does enabling printBackground fix every invisible-text PDF?
No. It only addresses cases where missing CSS background graphics affect the output; other symptoms need separate diagnosis.
Why can text be visible in a browser but not in a PDF?
PDF generation uses print rendering by default, so print-specific styles and print color handling can produce output that differs from the screen.
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.

