Use Puppeteer’s page.pdf() when you want a paginated document with print layout, paper-size and margin controls, or page ranges. Use page.screenshot() when you need an image of the rendered page, whether a viewport, full page, or selected region. A PDF uses print CSS by default; if the intended record is the screen rendering, switch to screen media before making the PDF.
Choose the artifact that fits the record
| Need | Use | Why |
|---|---|---|
| A readable, paginated document | page.pdf() |
PDF options include page format and dimensions, orientation, margins, scale, page ranges, headers and footers, and print backgrounds. |
| A visual image of the rendered page | page.screenshot() |
Save an image of the viewport, the full page with fullPage, or a selected region with clip. |
| A PDF intended to resemble screen styling | page.pdf() after page.emulateMediaType('screen') |
PDF generation uses print CSS unless you explicitly emulate screen media. |
These are different output formats, not a universal fidelity ranking. Puppeteer’s documentation does not establish that one is always better for archiving. Both methods save a static output: neither records interactive behavior nor guarantees that the original page can be reconstructed later.
As an Amazon Associate I earn from qualifying purchases.
What a PDF preserves—and what to configure
page.pdf() lays out the page for printing by default, so print-specific CSS can change what appears compared with a browser window. PDF colors are also modified for printing by default. If screen media is what you intend to save, call page.emulateMediaType('screen') before page.pdf(). For exact CSS colors, the Puppeteer documentation points to -webkit-print-color-adjust.
Free tools Windows power users keep installed
One-click scans. No signup required.
PDF output is useful when the saved record should behave like a document: choose paper dimensions, orientation and margins; select page ranges; and add headers or footers. The printBackground option defaults to false, so set it to true if background graphics are part of the record. preferCSSPageSize lets CSS @page sizing take priority over the PDF format settings. Tagged PDF generation is documented as experimental.
#1 Best Overall
- Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
What a screenshot preserves—and what to configure
page.screenshot() saves an image of the rendered page. By default, it captures the viewport; set fullPage: true to capture the entire page, or use clip to capture a specified region. Screenshot options include image type and quality; quality applies to formats other than PNG. omitBackground can produce a transparent image.
A screenshot is the more direct choice when the intended record is visual evidence rather than a paginated document. It does not provide PDF pagination, page ranges, or paper-size layout controls. Decide whether you need just the visible viewport or the full document before capture: those are different image records.
Rank #2
- Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Capture a PDF or screenshot with Puppeteer
The following Node.js examples show the essential pattern: navigate to the page, then save the chosen output. Replace the example URL with the page you need to capture. Install Puppeteer in your project before running them. The API references consulted identify version 25.12.0 where version metadata is available; verify option details against the Puppeteer version installed in your project.
Recommended Free Tools
PDF using print CSS
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
await page.pdf({
path: 'page.pdf',
format: 'A4',
printBackground: true
});
} finally {
await browser.close();
}
PDF using screen media
Use this variant when you want the PDF to use screen media rules instead of the default print media rules.
Rank #3
- Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
await page.emulateMediaType('screen');
await page.pdf({
path: 'page-screen.pdf',
format: 'A4',
printBackground: true
});
} finally {
await browser.close();
}
Viewport, full-page, and clipped screenshots
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
// Viewport image
await page.screenshot({ path: 'viewport.png' });
// Entire page image
await page.screenshot({ path: 'full-page.png', fullPage: true });
// A selected region; set coordinates and dimensions for your page
await page.screenshot({
path: 'region.png',
clip: { x: 0, y: 0, width: 800, height: 600 }
});
} finally {
await browser.close();
}
Practical checks for a useful archive
- Choose print or screen rendering deliberately for PDFs; the default is print CSS.
- Enable
printBackgroundwhen background graphics matter, because its default is off. - Specify the PDF dimensions, orientation, margins, or page range that suit the intended document.
- For images, decide whether the record is the viewport, the full page, or a clipped region.
- Inspect the saved output for missing content, unexpected print styling, or omitted backgrounds. A successful API call alone does not establish that the artifact contains everything you intended to preserve.
- Keep the scope of the record clear: these outputs are static and do not preserve the page’s interactive behavior or guarantee future reconstruction.
Troubleshoot common output problems
| Symptom | Likely cause | What to change |
|---|---|---|
| PDF styling differs from the browser view | page.pdf() uses print CSS by default. |
Call page.emulateMediaType('screen') before page.pdf() if screen media is the intended output. |
| PDF is missing background graphics | printBackground defaults to false. |
Set printBackground: true. |
| PDF colors look different from the page | PDF colors are modified for printing by default. | Check whether print or screen media is intended, and consult the CSS -webkit-print-color-adjust behavior for exact colors. |
| Screenshot contains only the visible portion | The capture is a viewport screenshot, not a full-page capture. | Set fullPage: true, or use clip if only a region is needed. |
| PDF page sizing does not follow the site’s CSS page size | The PDF is using PDF sizing rather than prioritizing the CSS @page size. |
Set preferCSSPageSize when CSS page sizing should take priority. |
Performance, reliability, and preservation limits
The cited Puppeteer documentation describes output options, not a head-to-head speed or reliability benchmark. Capture time and successful rendering depend on the target page and the conditions under which it loads; no universal timing or reliability figure is established here. The examples wait for networkidle0 before capture, but that is a navigation choice, not proof that every page-specific element or delayed interaction has finished loading.
For preservation work, retain the output in the format suited to later use and inspect it after capture. A PDF or screenshot is a snapshot, not a complete archival package: it does not preserve interactive behavior and should not be treated as a guarantee that the page can be rebuilt or verified later.
Rank #4
- Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
- Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
- To get set up, connect the portable hard drive to a computer for automatic recognition no software required
- This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
- The available storage capacity may vary.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. A single GET request can return a PNG, JPEG, WebP, or PDF; its clean-shot steps accept cookie and consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets, with each step switchable. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses report page verdict and billing headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Example cURL request (replace the URL as needed; see the ScreenshotNeo documentation):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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; and 1,000 screenshots a month are free with no card, with paid plans starting at $5 for 3,000. Sign up for free.
FAQ
Can Puppeteer save a PDF using screen CSS?
Yes. Call page.emulateMediaType('screen') before page.pdf(); otherwise the PDF method uses print CSS.
Best Value
- [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
- 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
- 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
- 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
- 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
Does a screenshot create a PDF?
No. page.screenshot() captures an image. Use page.pdf() for PDF output.
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.




