Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

How to Fix Table Row Height Issues in Puppeteer PDF Output

Puppeteer PDFs use print CSS by default. Find the cause of changing table row heights by checking media styles, PDF width and margins, fonts, pagination, and browser versions.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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():

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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
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

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 explicit width and height, sets PDF dimensions.
  • margin reduces the space available to page content.
  • scale changes the rendered content size.
  • preferCSSPageSize controls whether a stylesheet’s @page size takes priority over the PDF dimensions. Its default is false, 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 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

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.

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

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
Sale
Hammermill Printer Paper, Premium Inkjet & Laser Paper 24 Lb, 8.5 x 11-1 Ream (500 Sheets) - 97 Bright, Made in the USA, 166140R
  • 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

  1. Reduce the page to the affected table, its relevant CSS, and the specific content that expands, clips, or splits a row.
  2. Compare screen and print media, including @media print and @page rules. If screen styling is the target, test page.emulateMediaType('screen') before PDF generation.
  3. Record the PDF paper dimensions, margins, scale, and preferCSSPageSize setting. Check whether narrower usable width causes extra line wraps.
  4. Confirm the cell font is loaded and applied, then compare its wrapping with the PDF output.
  5. Keep Puppeteer and its selected browser executable consistent while testing. Check the supported version mapping and the actual browser binary used on each machine.
  6. 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
HP Papers | 8.5 x 11 Paper | All In One 22 lb | 1 Mega Ream - 750 Sheets | 96 Bright | Made in USA - FSC Certified | 207750R
  • 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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
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

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.

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

Quick Recap

Bestseller No. 1
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. 2
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. 5
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
$21.96

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.