If table rows look different in a Puppeteer PDF than they do in the browser, first compare print and screen rendering. page.pdf() uses print CSS by default, so print-only styles, the PDF’s available content width, text wrapping, font metrics, and pagination can all change row dimensions. There is no single CSS property that fixes every row-height problem; isolate which input changes the layout, then adjust that input.
Start by comparing screen and print rendering
Puppeteer generates PDFs using the print CSS media type by default. A page can therefore have different table styles in the PDF than in the browser window, even when both use the same HTML. Inspect @media print rules and any selectors affecting tables, rows, headers, or cells.
As an Amazon Associate I earn from qualifying purchases.
If the PDF is supposed to match the screen appearance, test screen media before calling page.pdf():
await page.emulateMediaType('screen');
await page.pdf({ path: 'table.pdf' });
Use this as a diagnostic comparison, not as a universal fix: screen media may be wrong if the page relies on print-specific styles or page-breaking behavior. See Puppeteer’s Page.pdf() reference.
#1 Best Overall
- 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
Check the PDF’s page size and usable width
Rows often become taller because a cell’s text wraps onto more lines. PDF paper size, margins, scale, and CSS page sizing affect how much horizontal room the table has. Compare these settings with the browser view and inspect the resulting line breaks.
format, or explicitwidthandheight, sets PDF dimensions.marginreduces the space available to page content.scalechanges the rendered content size.preferCSSPageSizecontrols whether a stylesheet’s@pagesize takes priority over the PDF dimensions. Its default isfalse, so content is scaled to fit the paper size.
Make the intended page-size choice explicit when comparing results. If you want the CSS @page dimensions to take precedence, test preferCSSPageSize: true; otherwise, align the PDF dimensions with the print layout. The available controls and defaults are documented in Puppeteer’s PDFOptions reference.
Rank #2
- 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
Inspect table, cell, and print styles
In a minimal reproduction, compare the computed styles for the affected table, tr, th, and td under screen and print media. Look for differences in padding, line height, borders, widths, white-space handling, and page-break rules. Also check whether the table’s fixed or automatic layout changes how columns share the available width.
Do not assume that height, min-height, or break-inside alone will solve the issue. Row sizing depends on table layout, cell content, print styles, and pagination; forcing a height can clip content rather than make the layout correct.
Rank #3
- PREMIUM PRINTER PAPER – Hammermill Premium Inkjet & Laser 24lb Printer Paper is a versatile sheet that’s perfect for double-sided inkjet or laser printed projects. With a 97 brightness & blue-white shade, you get consistently sharp, clear images.
- COLORLOK TECHNOLOGY – This computer paper features ColorLok Technology for colors that are 30% brighter, blacks that are 60% bolder and ink that dries 3x faster. This white copy paper will provide consistently superior results.
- PERFECT FOR PRINTING – This multi-purpose copier paper is designed to run smoothly through all office equipment for professional results when printing newsletters, flyers, reports, memos, and more. It’s also acid-free paper to prevent yellowing over time.
- SUSTAINABLY MADE IN THE USA – Original Hammermill printer paper is Forest Stewardship Council (FSC) certified, which means they are made with renewable resources from third-party certified, sustainably managed forests.
Verify fonts before attributing wrapping to CSS
Font metrics affect how much text fits on each line, so a missing web font or fallback font can change row height. Puppeteer’s PDF generation waits for fonts by default, and PDFOptions.waitForFonts defaults to true. If wrapping remains inconsistent, verify in the page that the intended font is available and actually applied; the default wait does not prove that a requested font loaded successfully. See the PDFOptions reference.
Use a minimal reproduction to isolate the cause
- Reduce the page to the affected table, its relevant CSS, and the specific content that expands, clips, or splits a row.
- Compare screen and print media, including
@media printand@pagerules. If screen styling is the target, testpage.emulateMediaType('screen')before PDF generation. - Record the PDF paper dimensions, margins, scale, and
preferCSSPageSizesetting. Check whether narrower usable width causes extra line wraps. - Confirm the cell font is loaded and applied, then compare its wrapping with the PDF output.
- Keep Puppeteer and its selected browser executable consistent while testing. Check the supported version mapping and the actual browser binary used on each machine.
- Compare the same minimal case in regular print/headful output and headless output before deciding whether the problem is browser-specific.
Puppeteer publishes a version-to-browser mapping and notes that current versions use Chrome for Testing. Check its supported browsers page when output differs across machines or after an upgrade.
Rank #4
- MADE IN USA - HP Papers is sourced from renewable forest resources and has achieved production with 0% deforestation in North America. See images.
- OPTIMIZED FOR HP TECHNOLOGY - All HP Papers provide premium performance on HP equipment, as well as on all other printer and copier equipment. 100% satisfaction . See images.
- PERFECT OFFICE PAPER WHEN YOU NEED TO PRINT COLOR DOCUMENTS - HP All-In-One22 is thicker, brighter and whiter than ordinary multipurpose printing papers and is optimized for all inkjet and laser printers and copiers.
- CERTIFIED SUSTAINABLE - HP All-In-One22 22lb printer paper is Forest Stewardship Council (FSC) certified and contributes toward satisfying credit MR1 under LEED (Leadership in Energy and Environmental Design). See images.
- COLORLOK TECHNOLOGY PRINTING PAPER - Colorlok technology provides more vivid colors, bolder blacks and faster drying. See images.
Troubleshoot by symptom
| Symptom | First comparison | What to inspect |
|---|---|---|
| Rows grow only in the PDF | Screen media versus print media | @media print rules and print-specific table or cell styles |
| Rows grow when text wraps | Browser width versus PDF content width | Paper size, margins, scale, column widths, and font actually used |
| Rows differ between runs or machines | Font loading and browser executable/version | Whether the intended font loaded and whether the same supported Puppeteer/browser pairing is used |
| Rows split or move across pages | Print/headful output versus headless output | Pagination and print CSS; determine whether the same minimal case reproduces in both modes |
These comparisons identify likely layout inputs; none implies that a particular page has a confirmed Puppeteer defect. Puppeteer’s PDF issue triage guidance directs problems reproducible in the regular print dialog or headful mode to Chromium’s Blink Layout component. For issues that reproduce only in Headless mode, it points to Chromium’s Internals Headless component.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Or skip the browser setup
For a screenshot rather than a PDF, ScreenshotNeo can return an image from one request. Its clean-shot steps accept cookie or consent banners and remove known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. ScreenshotNeo also provides an MCP server with screenshot, page-info, and PDF-capture tools for AI agents. The free plan includes 1,000 shots a month without a card; paid plans start at $5 for 3,000 shots. For PDF layout diagnosis, keep using the PDF controls and comparisons above.
Example cURL request for a screenshot:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Sign up for 1,000 free screenshots a month with no card.
Best Value
- 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
Frequently Asked Questions
Does Puppeteer always use print CSS when creating a PDF?
Yes. page.pdf() uses print media by default; call page.emulateMediaType('screen') first only when screen styling is the intended output.
Is there a guaranteed CSS property for fixing PDF row heights?
No universal property is established. The right change depends on media styles, content width and wrapping, fonts, table layout, and pagination.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.




