Free tools Windows power users keep installed
One-click scans. No signup required.
Remove Chrome’s generated date, URL, and page-number furniture with --no-pdf-header-footer; remove the printed page inset with @page { margin: 0; }. In Puppeteer, set every PDF margin to zero and use displayHeaderFooter: false. If whitespace remains, it is probably in the webpage’s CSS or source content rather than the PDF page margin.
First identify which “margin” you are seeing
PDF whitespace has several possible causes, and each requires a different fix:
- Generated browser furniture: Chrome adds a date, page title or URL in the header and a page number in the footer when print headers and footers are enabled.
- PDF page margins: the printed page box reserves space around the rendered document. CSS
@pagerules or Puppeteer’smarginoption control this. - Whitespace in the document: body padding, element margins, fixed-width content, deliberate spacer elements, or print-only styles can leave visible gaps even with a zero PDF margin.
- Whitespace already embedded in source material: if you are placing an existing PDF or image inside a new document, the empty area belongs to that source asset and is not removed by Chrome’s print settings.
Inspect a page with a visible date, URL, or page number first. That is browser-generated furniture. If the entire page content is inset without those labels, start with page-margin settings. If only particular elements have gaps, inspect the page’s print CSS.
Remove margins with the Chrome command line
For a direct Headless Chrome capture, pass the current header/footer switch alongside --print-to-pdf:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitches#1 Best Overall
- INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
- COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
- ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
- HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs
chrome --headless --print-to-pdf --no-pdf-header-footer https://example.com/
Chrome writes the result to output.pdf by default. The --no-pdf-header-footer switch suppresses Chrome’s automatically generated header and footer, including the date, URL, and page number documented in the Headless command-line reference.
When the switch appears to do nothing
Check the executable and version actually running in your automation environment. Older Chrome releases used --print-to-pdf-no-header; the current documented name is --no-pdf-header-footer. Do not assume a system Chrome version matches the browser installed in a container, CI runner, or server image.
Chrome’s Headless documentation also notes a packaging change: since Chrome 132.0.6793.0, the old Headless mode is available only as the standalone chrome-headless-shell binary, while current Chrome uses the unified Headless implementation. Verify which binary your command invokes before diagnosing a version-specific result. See the Headless mode documentation.
Set print margins to zero with CSS
Put the following in the page’s stylesheet. The rule affects printed output without changing the normal screen layout:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
@media print {
@page {
margin: 0;
}
}
The @page rule controls printed page size and margins under CSS Paged Media. Chrome’s explanation of print margins and browser-generated content also describes why browser furniture can disappear when the page has no margin space left for it.
Set page size when the physical format matters
If your output must be a particular paper size, declare it explicitly rather than relying on a user or container default:
@media print {
@page {
size: A4 portrait;
margin: 0;
}
}
Use the size required by your workflow, such as Letter or A4 landscape. A zero-margin page places content at the edge. Check for clipping, printer non-printable areas, and page breaks before using it for production documents.
Rank #2
- CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
- INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
- PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
- ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴
Reset document spacing separately
A zero page margin does not override spacing deliberately added by the document. A common print reset is:
@media print {
html, body {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
}
}
Apply resets carefully. Removing every element margin can damage headings, lists, tables, and components that rely on spacing. Prefer targeted rules for the elements responsible for the remaining gap.
Remove margins in Puppeteer
Puppeteer exposes the relevant controls in its PDF options. Set all four margins explicitly and disable generated header/footer rendering:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: true });
try {
const page = await browser.newPage();
await page.goto('https://example.com/', { waitUntil: 'networkidle0' });
await page.pdf({
path: 'output.pdf',
format: 'A4',
printBackground: true,
margin: {
top: '0',
right: '0',
bottom: '0',
left: '0'
},
displayHeaderFooter: false
});
} finally {
await browser.close();
}
})();
displayHeaderFooter: false prevents Puppeteer’s generated header and footer templates from being used. The four margin values remove the reserved page area. Confirm option names and accepted value types against the PDFOptions API reference that matches the Puppeteer release installed by your project.
Use page CSS instead of, or in addition to, API margins
Puppeteer’s options control PDF generation, while @page controls the document’s print stylesheet. In a controlled application, setting both explicitly makes the intent clear:
Recommended Free Tools
await page.addStyleTag({
content: `
@media print {
@page { margin: 0; }
html, body { margin: 0; padding: 0; }
}
`
});
Do this before calling page.pdf(). If your application already supplies print CSS, inspect the cascade so a later rule does not restore a margin.
Choose the right control
| Method | Best for | Control point | Main consideration |
|---|---|---|---|
Chrome CLI --no-pdf-header-footer |
Removing Chrome-added date, URL, and page number | Chrome process arguments | Older versions may require --print-to-pdf-no-header. |
CSS @page { margin: 0; } |
Removing the printed page inset for a page stylesheet | HTML/CSS print layout | No margin space can also suppress automatic browser furniture. |
Puppeteer margin plus displayHeaderFooter: false |
Programmatic PDF generation | Puppeteer PDFOptions | Use documentation for the installed package version. |
Or skip the browser setup
ScreenshotNeo provides a website screenshot API and MCP server if you need a clean page capture or PDF without maintaining a Chrome process. One GET request can return PNG, JPEG, WebP, or PDF. For a PDF capture, use the API documented at ScreenshotNeo’s documentation and adapt the target URL:
Rank #3
- SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
- INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
- KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
- PREMIUM SUPPORT - Strong technical expertise to solve issues faster
- THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
For PDF output, request the PDF format and relevant paper, margin, orientation, or page-range options described in the documentation. ScreenshotNeo removes cookie-consent banners, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan. Create a free ScreenshotNeo account.
Troubleshoot remaining whitespace
Date, URL, or page number is still visible
- With the CLI, confirm
--no-pdf-header-footeris passed to the same Chrome binary that generates the file. - With Puppeteer, set
displayHeaderFooter: false; do not supply a custom header or footer template elsewhere in your wrapper. - If using an older Chrome build, try its documented legacy flag,
--print-to-pdf-no-header, and plan an upgrade or version-specific configuration.
The whole page is shifted inward
- Set all four Puppeteer margin sides to
'0', or add@page { margin: 0; }. - Check whether a later print stylesheet, framework rule, or component-level wrapper overrides your rule.
- Confirm the selected paper size and scale. A mismatch can look like a margin even when the page box is correct.
Only the content has gaps
- Inspect computed print styles for
bodypadding, heading and paragraph margins, list indentation, and wrapper padding. - Look for print-only spacer elements, fixed-width containers, or a background image that includes transparent borders.
- Use browser print emulation and inspect the generated layout before producing the PDF.
Content is clipped at the edge
Zero margins leave no safety area. Reduce oversized fixed elements, review page-break rules, and test long tables, images, and positioned elements across several pages. A document that looks correct in a viewer may still be unsuitable for a physical printer whose hardware cannot print to the edge.
The output differs between machines
Pin the Chrome and Puppeteer versions used in CI and production, and generate a fresh PDF after changing flags or CSS. Headless packaging, default paper size, fonts, viewport, and loading timing can all affect pagination. Wait for the page state your application requires before calling page.pdf(); otherwise late-loading fonts or images can change the apparent whitespace.
Reliability, performance, and operational notes
Keep generation deterministic
Use an explicit paper size, explicit margins, a stable viewport, and print CSS. Wait for the required network or application state rather than relying on an arbitrary short delay. Save the exact browser and Puppeteer versions with your deployment so a browser update does not silently alter pagination.
Validate the actual PDF
Open the generated file in a PDF viewer and inspect the first, middle, and last pages. Check header/footer absence, edge alignment, page breaks, clipped content, background colors, and image loading. A CSS change that fixes one page can create overflow on another.
Account for the cost of zero-margin design
Zero margins maximize usable area but reduce tolerance for printer hardware, unexpected content, and responsive layouts. For reports intended for office printing, a small intentional margin may be safer than edge-to-edge placement. For screen-only PDFs or controlled display systems, edge alignment may be appropriate.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.FAQ
Does @page { margin: 0; } remove Chrome’s URL and date?
It can leave too little space for automatic browser furniture, but use the dedicated CLI switch or Puppeteer option when your goal is specifically to disable generated headers and footers.
Rank #4
- Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
- No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
- Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
- Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
- The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art
Do I need both the CLI flag and CSS?
Not always. Use the CLI or Puppeteer setting for generated furniture and CSS or API margins for page insets. Applying both is reasonable when you control the HTML and want every layer to be explicit.
Why does a source PDF still have borders after I set zero margins?
The borders may be part of the source PDF or image itself. Chrome’s print controls cannot remove whitespace already embedded in content; crop or edit that source asset separately.
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 →Clear out junk files and repair common Windows errorsFree Scan →Which old flag should I try?
For a previous Chrome version that does not recognize the current switch, the documented legacy name is --print-to-pdf-no-header. Check the installed version rather than blindly adding both flags.
Frequently Asked Questions
Can zero margins cause content to be cut off?
Yes. Edge-to-edge placement leaves no safety area, so test long pages, positioned elements, images, and physical printers before deploying.
Does Puppeteer’s margin option change the webpage’s CSS?
No. It controls the PDF page box. Body padding, component margins, and other print styles must be changed in CSS.
What should I pin in CI for consistent PDFs?
Pin the Chrome binary and Puppeteer release, declare paper size and margins, wait for required page state, and inspect fresh output after upgrades.
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.

