To make Puppeteer PDFs smaller, first reduce unnecessary content in the print rendering—especially oversized images—then test post-processing on a copy. Puppeteer’s PDF settings mostly control appearance and page layout, not compression, so changing scale or paper size is not a guaranteed way to shrink a file. Measure each change and check the result for image quality, text, fonts, layout, and required document features.
Start with what Puppeteer puts on the page
page.pdf() uses the print CSS media type by default. That means print-specific CSS determines what is rendered, even if the page looks different in a browser window. Inspect your print styles for elements the PDF does not need: decorative sections, navigation, repeated controls, large backgrounds, or content meant only for on-screen interaction.
Remove or simplify unwanted content at the source where possible. This can reduce rendering work and may reduce the resulting PDF, but the amount depends on the page and its assets. If you deliberately need the screen version of the page instead, call page.emulateMediaType('screen') before generating the PDF; do not switch media types merely as a compression trick.
Example: render with print CSS
await page.emulateMediaType('print');
await page.pdf({ path: 'output.pdf' });
Print is already the PDF default, so the explicit call above is useful when making the intended media type clear in code. To use screen styles, replace 'print' with 'screen' and verify that the page dimensions and content are still appropriate for a PDF.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Check the PDF options for unintended layout choices
Puppeteer’s PDFOptions defaults include printBackground: false, preferCSSPageSize: false, and scale: 1. These options affect what is drawn and how it fits on the page. The documentation does not promise that changing them will reduce file size.
| Option | Default and effect | Size-related guidance |
|---|---|---|
printBackground |
false; background graphics are not printed by default. |
Leave it false if the design does not require backgrounds. Large color blocks or decorative backgrounds may contribute content to the PDF, but inspect the actual output rather than assuming a fixed saving. |
preferCSSPageSize |
false; when true, CSS @page size takes priority over API paper size settings. |
Choose deliberately whether CSS or the API controls page dimensions. An unintended large canvas or fit-to-paper scaling can produce the wrong layout; this setting is not documented as a compression option. |
format, width, height |
Specify the paper size unless CSS page size takes priority. | Use the dimensions the document actually needs. Smaller paper is not automatically a smaller PDF if it causes unreadable scaling or content changes. |
scale |
1; documented range is 0.1 to 2. |
Scaling can affect fit and legibility. Do not treat a lower scale as a PDF compression feature. |
waitForFonts |
true. |
This controls readiness, not compression. Setting it false is not a size-reduction fix and could affect font rendering. |
Make the page-size decision explicit
If the page has a CSS @page rule, decide whether that rule or Puppeteer’s format, width, or height should govern the output. Set preferCSSPageSize: true when CSS page dimensions should take priority. Otherwise, Puppeteer fits content to the configured paper size. Compare page dimensions and margins after changing this behavior.
Use backgrounds only when they are needed
printBackground is already false by default. Keep that default unless the PDF needs background graphics for its intended appearance. If enabling it, compare the generated files and inspect colored areas and images; the size effect depends on the document.
Reduce image data before the browser renders it
When a PDF contains many or large images, image payloads are often the most productive place to investigate. Prepare images at dimensions appropriate for their final printed or displayed size before Puppeteer renders the page. Avoid sending a very large source image when the PDF only needs a small rendering of it.
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 →Choose lossy formats or stronger compression only if the resulting quality is acceptable. Inspect fine details, text embedded in images, edges, and color at the size readers will actually view or print. Image downsampling and compression can reduce data, but they can also degrade quality; there is no universal reduction percentage.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Ghostscript’s optimization guidance discusses image resolution, compression, and color-space changes, and notes that image data can account for much of a PDF’s size when images are present. It also cautions that processing does not guarantee a smaller output: Ghostscript: Optimizing PDFs.
Test post-processing tools on a copy
If source-level changes are insufficient, compare a post-processed copy against the Puppeteer output. Keep the original file: rewriting can affect appearance and document features, and a tool can produce a larger file rather than a smaller one.
Ghostscript: more control, with fidelity trade-offs
Ghostscript’s pdfwrite can rewrite PDFs with controls for images and other content. Its documented presets include /screen, /ebook, /printer, and /prepress, but those names are not guarantees of a particular quality or output size. Try settings on representative files and check the results before using them in a batch workflow.
Recommended Free Tools
For a command-line trial, preserve a distinct source and destination filename. This example uses Ghostscript’s /ebook preset as a starting point, not a promise that it is right for every document:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook
-dNOPAUSE -dBATCH -dQUIET
-sOutputFile=output-ebook.pdf input.pdf
Keep input.pdf unchanged and review output-ebook.pdf before replacing or distributing anything. In particular, do not routinely remove embedded fonts to chase a smaller file: font substitution by a viewer can alter how pages look.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
qpdf: try stream cleanup, not image resizing
qpdf can recompress streams, apply generalized decoding, recompress Flate streams at higher compression, and optionally recompress eligible images using JPEG when that reduces their size. It does not resample images, so it is not a substitute for preparing oversized source images at appropriate dimensions.
The qpdf command-line documentation says: “While qpdf’s primary function is not to optimize the size of PDF files, there are a number of things you can do to make files smaller.” Treat it as a comparison for structural or stream cleanup rather than a dedicated size optimizer: qpdf command-line documentation.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsExact options can vary by qpdf version. Consult the documentation for the version you have installed before choosing stream or image recompression flags, then run the command against a copy and measure the output. This avoids applying a flag based on an example intended for a different release.
Measure whether a change actually helped
Compare the original and revised file sizes in bytes, then check that the new file meets the actual upload or delivery limit. A size decrease alone is not success if it harms readability or removes a feature the workflow needs.
- Images: compare sharpness, color, and readability at the intended viewing or print size.
- Text and fonts: confirm text remains selectable and searchable, and that fonts still render as intended.
- Layout: verify page dimensions, margins, breaks, and fit after changes to print CSS, paper size, or scale.
- Functionality: test required links, metadata, accessibility or structure, and other document features after rewriting.
- Workflow: measure processing time and operational complexity for the expected batch size.
These are validation checks, not guarantees that every post-processor preserves every feature. Use representative documents and the same checks for each candidate output.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Troubleshoot common size-reduction attempts
The PDF is still large after changing scale
scale changes rendered fit and legibility; it is not documented as a compression setting. Restore an appropriate scale and target large source images or content that does not belong in the print rendering.
Turning off backgrounds makes no noticeable difference
printBackground is false by default. If it was already false, changing it cannot explain a new reduction. If you enabled it, compare the files and look at the page content; backgrounds do not have a predictable size impact across documents.
The layout changes after adjusting paper size
Check whether CSS @page dimensions or API paper settings are controlling the output. With preferCSSPageSize: true, CSS page size takes priority; otherwise, content is scaled to fit the configured paper size. Confirm page dimensions, margins, and readability rather than choosing a setting solely for file size.
The rewritten PDF looks different
Image compression, color-space changes, and font handling can affect fidelity. Compare the original and processed versions page by page. If text, color, or fonts are no longer acceptable, use a less aggressive setting or skip that post-processing step.
The processed file is larger
Neither Ghostscript nor qpdf guarantees a smaller result. Keep the original when a rewrite increases size, and test another approach—particularly reducing oversized images before rendering.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Text or links no longer behave as expected
Check selectable/searchable text and the document features your downstream workflow relies on after each rewrite. If a processor changes a required property, retain the browser-generated PDF or select settings that preserve it.
Or skip the browser setup
If the goal is a clean screenshot or PDF of a web page rather than a custom Puppeteer-rendered document, ScreenshotNeo can return one with a GET request. It can accept cookie and consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; those steps 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. Its MCP server provides screenshot and PDF tools for AI agents.
Example cURL request (replace the key with your API key):
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 and response details. ScreenshotNeo offers 1,000 screenshots a month free with no card; paid plans start at $5 for 3,000. Sign up for the free plan.
Free tools Windows power users keep installed
One-click scans. No signup required.
Frequently Asked Questions
Does Puppeteer compress PDFs automatically?
The documented PDF options control rendering and layout; they do not promise a general compression step or a particular file-size reduction.
Can I use qpdf to reduce image resolution?
No. qpdf can recompress eligible image data but does not resample images; resize or prepare oversized source images before rendering.
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.

