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

If text looks smaller in a Puppeteer PDF than in the browser, check the rendering mode, font loading, and page-fit settings before changing CSS font sizes. Page.pdf() uses print CSS by default, and PDF page dimensions or scaling can alter the apparent size even when the CSS font size has not changed.

Diagnose the cause before changing font sizes

Work through these checks in order: confirm whether the PDF should use print or screen styling; verify the intended font loaded in the PDF-generation runtime; then inspect the PDF scale and page-size settings together. Save and inspect the generated PDF rather than relying only on the browser preview. A persistent mismatch can depend on the page’s CSS, PDF options, Puppeteer version, and Chromium runtime, so there is no universal CSS adjustment.

  1. Decide whether the PDF should use print styles or screen styles.
  2. Check that the intended font is available and loaded in the process creating the PDF.
  3. Review PDF scaling, paper dimensions, margins, and CSS @page as a set.
  4. Compare the resulting PDF and runtime details; reduce the case to a minimal reproduction if needed.

Check print CSS versus screen CSS

Puppeteer’s Page.pdf() generates a PDF using the print CSS media type by default. That means the PDF may use rules in @media print, a print stylesheet, or other print-specific layout behavior that does not apply to the on-screen page. For example, a print rule may explicitly set a smaller font size, or change the available width so text wraps differently and appears more compact.

Inspect both the page’s regular styles and its print-specific rules. Also check whether the page loads a separate print stylesheet or applies styles through JavaScript when the media type changes. If the PDF is meant to represent a printable document, leave Puppeteer in its default print mode and fix the print styles that produce the undesired result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
  • EDIT text, images & designs in PDF documents. ORGANIZE PDFs. Convert PDFs to Word, Excel & ePub.
  • READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.
  • CREATE, COMBINE, SCAN and COMPRESS PDFs
  • FILL forms & Digitally Sign PDFs. PROTECT and Encrypt PDFs
  • LIFETIME License for 1 Windows PC or Laptop. 5GB MobiDrive Cloud Storage Included.

If the PDF is intentionally meant to preserve the screen presentation, set the media type before calling page.pdf():

await page.emulateMediaType('screen');
const pdf = await page.pdf({
  format: 'A4',
  scale: 1,
  waitForFonts: true,
});

This changes which media rules apply; it does not simply enlarge text. Confirm that screen styling is actually the desired output, since screen-oriented layout may paginate or fit paper differently from print styling.

Confirm the intended font is loaded in the PDF runtime

A browser preview and the process that generates a PDF do not necessarily have identical access to font files. A missing or unavailable web font can result in fallback typography, which may have different character widths, line breaks, and visual proportions even when the declared font-size is unchanged.

Current Puppeteer documentation says page.pdf() waits for fonts by default. The waitForFonts option waits for document.fonts.ready to resolve. Still, verify that the intended font actually loaded: waiting for the font-loading process to settle is not the same as proving that the desired font was fetched successfully. Check the generated page’s network activity and font-loading state in the same runtime and environment used to create the PDF.

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.

If the page is running in the background, Puppeteer documentation notes that bringing it to the foreground may be necessary for font readiness to resolve. You can explicitly enable the documented wait while investigating:

const pdf = await page.pdf({
  waitForFonts: true,
});

Do not use this option as a substitute for making the font available. Check the font URL, server response, any authentication or cross-origin requirements, and whether the generation environment can reach the host. A local font that exists on a developer’s machine may not exist in a container or deployment environment.

Rank #2
PDF Reader, PDF Viewer, PDF Editor- file document
  • Fast PDF reader with read aloud, night mode, reading mode, search and bookmarks
  • Highlight, underline, draw, add notes and text on any PDF
  • Fill PDF forms, sign documents with your finger and protect PDFs with a password
  • Convert PDF to Word or JPG; merge, extract and reorder pages; scan with your camera
  • Works on Fire TV: send PDFs from your phone over Wi-Fi and read them on the big screen

Inspect PDF scale, page dimensions, and margins together

Check the page-fit transformation before compensating with a larger CSS font size. Puppeteer’s scale option defaults to 1 and is documented from 0.1 to 2. A value below 1 reduces rendered content; a value above 1 enlarges it. If the option is omitted, check that no shared PDF-options object or wrapper is supplying another value.

Paper size can also affect the output. Puppeteer supports PDF dimensions through format or through width and height; CSS can specify a page size with @page. With the default preferCSSPageSize: false, content may be scaled to fit the paper size selected through the PDF options. With preferCSSPageSize: true, a CSS @page size takes priority over format, width, or height.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Setting What to verify
scale Check the effective value; the default is 1. Avoid changing it until you know whether the output is being scaled.
format, width, height Confirm that the selected paper dimensions match the document you intend to produce. Check which values are actually passed by your code or wrapper.
CSS @page Inspect the declared page size and any print styles that change the layout.
preferCSSPageSize The default is false; when set to true, CSS @page size takes precedence over PDF paper dimensions.
margin Compare the configured margins with the CSS page layout. Different usable page areas can change fitting and text flow.

Choose one clear source of truth for the paper dimensions. If CSS @page defines the intended size, consider preferCSSPageSize: true and avoid conflicting PDF dimensions. If the PDF options define the size, make the CSS and margins consistent with that choice. Do not turn on precedence options blindly: first determine which dimensions should control the output.

After changing an option, inspect the actual PDF page dimensions and text appearance. A browser viewport preview alone will not show every print-sizing or page-fit effect.

Use a controlled Puppeteer PDF setup

This example keeps print styling, an A4 paper format, unit scale, and font waiting explicit. It assumes you already have a page loaded with the target document. Keep or remove options to reflect the layout you actually want; in particular, do not combine conflicting paper-size rules.

import puppeteer from 'puppeteer';

const browser = await puppeteer.launch({ headless: true });
try {
  const page = await browser.newPage();
  await page.goto('https://example.com', { waitUntil: 'networkidle0' });

  // Page.pdf() uses print media by default. Do not switch to screen
  // unless the PDF is meant to use the page's screen styles.
  const pdf = await page.pdf({
    path: 'output.pdf',
    format: 'A4',
    scale: 1,
    waitForFonts: true,
    printBackground: true,
  });

  console.log(`Wrote ${pdf.length} bytes to output.pdf`);
} finally {
  await browser.close();
}

Replace the example URL with the page you are rendering. If CSS @page should control paper size, set preferCSSPageSize: true and make sure the document’s CSS declares the intended size. If your purpose is to render screen styles, call await page.emulateMediaType('screen'); after loading the page and before page.pdf().

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
  • Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.
  • Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
  • Read & Annotate. Enjoy intuitive reading modes and powerful tools to comment, highlight, and mark up PDFs.
  • Create & Manage PDFs. Create new PDFs, combine multiple files, scan documents, and compress for easy sharing.
  • Fill & Sign Forms. Complete forms and digitally sign documents with secure e-signature tools.

Check the PDF, not just the browser preview

Once the media, font, and sizing settings are understood, save the PDF and inspect it in a PDF viewer. Compare the same text block across outputs and note whether glyph size, line wrapping, page count, or margins changed. These clues help distinguish a font-size rule from a page-fit or font-metric difference.

  • If glyphs appear uniformly smaller while layout otherwise tracks the browser, inspect effective scale and page-size fitting.
  • If glyph shapes or line breaks differ, confirm the intended font loaded and compare its availability in the generation environment.
  • If only print output differs, inspect print styles and print-specific layout rules.
  • If different pages or sections vary, check for scoped CSS, page breaks, or content-specific styles rather than assuming a global font-size issue.

For a reproducible case, reduce the page to one representative text block using the same font, CSS media rules, and paper dimensions. Keep the HTML and PDF options identical to the failing run while simplifying unrelated content.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common causes

The PDF is smaller than the screen preview

Likely cause: the PDF is using print CSS or fitting content to the selected paper dimensions. Fix: compare @media print with screen rules, then inspect scale, paper size, preferCSSPageSize, and margins. Use screen media only if screen styling is the intended PDF design.

The font looks different even though CSS declares the right family

Likely cause: the desired font did not load in the generation environment, so a fallback font was used. Fix: verify font requests and loading state in the runtime that launches Chromium. Check that the font resource is reachable there, and wait for document.fonts.ready through Puppeteer’s font-wait behavior.

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

Changing CSS font size has not fixed the PDF

Likely cause: the mismatch is caused by media rules, font metrics, or page fitting rather than the base declaration. Fix: restore the intended CSS size and isolate the cause using the media, font, and page-dimension checks above. Arbitrarily increasing font size can make the browser preview wrong while leaving the underlying PDF transformation unresolved.

deviceScaleFactor did not change the PDF font size

Likely cause: it is not the most direct documented control for PDF sizing. A 2019 report using Puppeteer 1.12.2 said changing deviceScaleFactor had no effect on that reporter’s PDF output; that historical report does not establish behavior for every current version. Fix: reproduce against your installed Puppeteer and Chromium versions, and first inspect the documented PDF options such as scale and page-size settings.

Rank #4
OfficeSuite: Word documents, Excel Sheets, PowerPoint Slides & PDF Editor & Converter
  • All-in-one office pack - Documents, Sheets, Slides & PDF
  • Cross-platform (Android, iOS, Windows PC)
  • Supports Microsoft Office formats
  • Use 30+ charts & 250+ formulas in Sheets
  • In-depth features for document creation & formatting

The mismatch persists after the basic checks

Next step: record the generated HTML, relevant screen and print CSS, exact Page.pdf() options, font-loading state, Puppeteer and Chromium versions, and a sample PDF. Reduce the case to a single text block, the same font, and the same page dimensions. Historical reports of multipage sizing problems show that changing font size, line height, or page-size preferences does not necessarily resolve every layout issue; their version details matter and do not prove a current general defect.

Or skip the browser setup

If your goal is a clean capture of a webpage rather than debugging a Puppeteer-generated PDF, ScreenshotNeo can return a screenshot or PDF from one GET request. It will not correct font settings in your existing Puppeteer PDF pipeline.

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.

For example, this cURL request saves a WebP 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 parameters and output options. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for free and try ScreenshotNeo.

Frequently Asked Questions

Does Puppeteer use print styles when generating a PDF?

Yes. Page.pdf() uses the print CSS media type by default; choose screen media explicitly only when that is the intended presentation.

Should I change deviceScaleFactor to make PDF text larger?

It is not the first control to try. Diagnose PDF scale and paper sizing against your installed Puppeteer and Chromium versions.

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

Quick Recap

Bestseller No. 1
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
PDF Extra 2024| Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Lifetime License | 1 Windows PC | 1 User [PC Online code]
READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.; CREATE, COMBINE, SCAN and COMPRESS PDFs
$99.99
Bestseller No. 2
PDF Reader, PDF Viewer, PDF Editor- file document
PDF Reader, PDF Viewer, PDF Editor- file document
Fast PDF reader with read aloud, night mode, reading mode, search and bookmarks; Highlight, underline, draw, add notes and text on any PDF
$6.85
Bestseller No. 3
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
MobiPDF Lifetime - Professional PDF Editor for Windows | Edit, Sign & Convert PDFs | Best Adobe Acrobat Pro Alternative | Lifetime License
Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.; Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
$99.99
Bestseller No. 4
OfficeSuite: Word documents, Excel Sheets, PowerPoint Slides & PDF Editor & Converter
OfficeSuite: Word documents, Excel Sheets, PowerPoint Slides & PDF Editor & Converter
All-in-one office pack - Documents, Sheets, Slides & PDF; Cross-platform (Android, iOS, Windows PC)

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.