The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →For a single PDF, set margins in your browser’s print dialog and check the preview. For a site or web app that must export consistently, define print CSS with @media print and @page. The dialog controls one export; CSS creates repeatable rules, although the browser or PDF engine and the user’s print settings still affect the result.
Choose the right margin method
Use the browser when you are saving one page and do not control its source code. Use print CSS when you own the page, generate documents repeatedly, or need a predictable layout for an application.
| Method | Best for | Who controls it | Main limitation |
|---|---|---|---|
| Print dialog | One-off exports | The person printing | Settings must be repeated for each export and labels vary by browser |
| Print stylesheet | Reusable site or app behavior | The page author, subject to user settings | Support for some paged-media features differs between renderers |
Set margins for a one-off PDF in Firefox
- Open the page you want to export.
- Open the print dialog from the browser menu or with the operating system’s print shortcut.
- Set Destination to Save to PDF.
- Expand More settings.
- Change Margins. Choose the smallest setting that still leaves room for readable text, page numbers, or binding.
- Check Paper size and Scale before saving. A paper-size mismatch can make a correct margin look wrong.
- Review every page in the preview, then save the PDF.
Firefox also exposes print format, headers and footers, background printing, paper size, and scale. A page can deliberately use different print styles from its screen layout, so the preview—not the screen—is the reliable check.
What to inspect in the preview
- Text or tables cut at the left or right edge.
- Headings stranded at the bottom of a page.
- Images or code blocks extending beyond the printable area.
- Unexpected URL, title, or date text in a header or footer.
- Excessive blank space caused by scale, paper size, or a large authored margin.
Define reusable margins with print CSS
Put print-only rules in a stylesheet linked with media="print", or place them in an existing stylesheet inside @media print. The @page rule sets the page box, including dimensions, orientation, and margins.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- 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
@media print {
@page {
margin: 15mm;
}
}
15mm is an example from Confluence’s PDF stylesheet guidance, not a universal recommendation. Choose a value that fits your document, printer assumptions, and any binding or annotation space.
Set each side independently
Use individual properties when the top, bottom, or inner edge needs a different amount of space:
@media print {
@page {
margin-top: 20mm;
margin-right: 15mm;
margin-bottom: 20mm;
margin-left: 25mm;
}
}
The equivalent shorthand is ordered top, right, bottom, left:
Rank #2
- 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
@page {
margin: 20mm 15mm 20mm 25mm;
}
Set paper size and orientation when required
Margins are calculated inside the selected page size. If your document must be landscape or use a specific sheet, declare those requirements and still verify the browser’s print dialog:
Free tools Windows power users keep installed
One-click scans. No signup required.
@media print {
@page {
size: A4 landscape;
margin: 15mm;
}
}
The receiving browser or export engine may let the user override paper size, orientation, or scale. Treat the generated PDF as the final authority.
Hide screen-only interface elements
Large navigation bars, cookie prompts, and interactive controls consume printable space unless you remove them:
Rank #3
- 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
@media print {
.site-nav,
.cookie-banner,
.chat-widget,
.print-hide {
display: none !important;
}
.content {
max-width: none;
}
}
Do not use a smaller margin to compensate for an element that should have been hidden. Fix the print layout first, then tune the page box.
Use different margins for covers, binding, and facing pages
A report with a cover page may need a larger top margin, while a bound document may need extra space on the inner edge. Paged-media selectors can express those intentions:
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 →@media print {
@page :first {
margin-top: 35mm;
}
@page :left {
margin-left: 25mm;
margin-right: 15mm;
}
@page :right {
margin-left: 15mm;
margin-right: 25mm;
}
}
Support for :first, :left, and :right depends on the browser or export engine. If the preview ignores these selectors, use a renderer with the required paged-media support or design the first page explicitly in the document.
Rank #4
- 5 ream case (2,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
Headers, footers, and margin content are separate
Page margins reserve space; they do not automatically remove browser-generated headers and footers. The print dialog may add the page URL, title, date, or page number when enough space remains. Turn those automatic items off in the dialog when they crowd your content.
Modern Chrome also supports authored content in page-margin areas. Chrome for Developers states that from Chrome 131 CSS can add content to printed page margins. This capability is separate from the browser’s own header and footer controls, and a renderer that supports one may not expose every margin-box feature.
Diagnose clipped or uneven output
The right edge is cut off
- Confirm the selected paper size matches the document’s intended size.
- Reduce scale slightly and inspect the preview again.
- Check for wide tables, fixed-width code, images, or long unbroken URLs.
- Increase the right and left margins only after fixing overflowing content.
There is too much blank space
- Check for an oversized
@pagemargin and for a browser scale below 100%. - Look for hidden elements that still reserve space because they use visibility rather than display removal.
- Disable automatic headers and footers if the blank area is at the top or bottom.
The CSS appears to do nothing
- Verify the stylesheet is loaded and the rules are inside
@media printor a stylesheet withmedia="print". - Use the browser’s print preview, not a screenshot of the screen.
- Check for later rules with greater specificity that override the print declarations.
- Test the actual PDF engine used in production; support for parts of
@pagevaries.
Headers or footers overlap authored content
Disable browser-generated headers and footers, or increase the corresponding page margin. A zero or very small margin leaves little room for automatic items even when the page itself has authored margin content.
Best Value
- Made in USA: HP Papers is sourced from renewable forest resources and has achieved production with 0% deforestation in North America.
- Optimized for HP technology: All HP Papers provide premium performance on HP equipment, as well as on all other printer and copier equipment.
- Perfect everyday office paper: Superior quality, reliability, and dependability for high-volume printing at home, at school and in the office. Perfect for everyday black and white printing.
- Certified sustainable: HP Office20 20lb printer paper is Forest Stewardship Council (FSC) certified and contributes toward satisfying credit MR1 under LEED (Leadership in Energy and Environmental Design).
- ColorLok technology printing paper: ColorLok technology provides more vivid colors, bolder blacks and faster drying.
Different browsers produce different PDFs
Keep the CSS conservative, declare paper size and orientation only when necessary, and maintain a preview check in your workflow. Browser controls, user preferences, and export engines can change the final pagination.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Build a dependable export workflow
- Create a print-specific stylesheet and remove interface-only elements.
- Set a documented base margin, such as
15mm, then adjust it for the document’s actual content. - Add independent side values when a gutter, cover, or facing-page layout requires them.
- Test long headings, tables, images, code, links, and blank or very short pages.
- Export with the same browser or PDF engine used by your users or server.
- Open the resulting PDF and inspect page breaks, not only the first page.
Or skip the browser setup
ScreenshotNeo can capture a URL through one request and return a PNG, JPEG, WebP, or PDF. Its clean-shot process accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be disabled. 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 X-Page-Verdict and X-Billed headers. For PDF-specific paper size, margins, orientation, and page ranges, use the current ScreenshotNeo documentation and verify the generated PDF.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. Every feature is included on every plan: 1,000 shots per month are free with no card, Starter is $5 for 3,000, and yearly billing provides two months free. Sign up free to try it.
Margin decisions that prevent common failures
- Readable body text: keep enough inner space for comfortable line lengths instead of squeezing content to fit one more column.
- Binding: assign the larger margin to the inner edge, then test both left and right pages.
- Forms and worksheets: preserve writing space and avoid placing labels in the printer’s non-printable area.
- Images and charts: reserve space for captions and prevent fixed dimensions from exceeding the content box.
- Automated exports: pin the browser or rendering engine version where reproducibility matters, and archive representative PDFs for regression checks.
Frequently Asked Questions
Should I use CSS or the print dialog to set PDF margins?
Use the print dialog for a one-off export. Use @media print and @page when the same margin policy must apply repeatedly to a site or application.
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 glitchesIs 15 mm the correct margin for every PDF?
No. It is a documented example, not a universal standard. Adjust it for paper size, content, binding, and the target renderer.
Why do my CSS margins differ from the saved PDF?
The browser’s paper size, scale, headers and footers, user preferences, and support for paged-media features can alter the final output. Check the print preview and the actual PDF.
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.

