How to Save a Webpage as PDF with Page Numbers
Save a webpage as a numbered PDF using your browser’s print dialog. Follow steps for Chrome, Firefox, and Edge, then fix missing numbers or awkward page breaks.
The quick answer: Open the webpage, choose Print, select a PDF destination, turn on the browser’s Headers and footers option, check that page numbers appear in the preview, and save. The exact control varies by browser and operating system. In Microsoft Edge, the setting explicitly puts the page number in the footer; in Firefox, look under More settings.
Preview the whole document before saving. A webpage can paginate differently from its on-screen layout, and the page size, scale, orientation, and margins affect where page breaks fall.
Save a webpage as a numbered PDF in Chrome
- Open the webpage you want to save.
- Open the print dialog with File → Print, Ctrl+P on Windows or Linux, or ⌘+P on Mac.
- Choose Save as PDF (or the available PDF destination).
- Open the additional print settings and look for Headers and footers. Labels and placement can vary by platform and version; confirm the page number is visible in the preview.
- Review the page breaks, then select Save and choose a filename and location.
Chrome’s help documents choosing a destination and changing print settings, including the Save as PDF workflow. If the preview does not show page numbers, do not assume they will appear in the saved file; check the available headers and footers setting first. Google Chrome Help: Print from Chrome
Save a webpage as a numbered PDF in Firefox
- Open the page and choose Print or press Ctrl+P (Windows/Linux) or ⌘+P (Mac).
- Choose Save to PDF as the destination.
- Expand More settings and enable Print headers and footers.
- Set paper size, scale, margins, orientation, and background printing as needed.
- Inspect the preview for page numbers and content clipping, then save the PDF.
Firefox also offers an Original or, on some pages, Simplified format. Simplified format may reduce clutter, but Firefox does not allow print backgrounds to be selected at the same time as Simplified format. Mozilla Support: How to print web pages in Firefox
Save a webpage as a numbered PDF in Microsoft Edge
- Open the webpage and choose Settings and more → Print, or press Ctrl+P on Windows or ⌘+P on macOS.
- Expand More settings and select Headers and footers.
- Choose the available PDF destination or save-to-PDF flow.
- Check the preview. Edge’s setting adds the current date to the header and the page number to the footer.
- Adjust scale or margins if needed, then save.
Edge offers fit-to-printable-area, actual-size, and custom scaling choices. Use the preview to check that the number and body text fit as intended. Immersive Reader may help simplify a page on supported websites, but it is not available everywhere. Microsoft Support: Print in Microsoft Edge
Make page numbers appear consistently
Browser-generated page numbers are usually part of the print header/footer feature. Turn that setting on, leave enough margin space for it, and verify the result in the preview. The page number shown there is the number of the printed PDF page; if you print only a page range, numbering behavior can depend on the browser’s print flow.
- Reserve footer space: Avoid zero or very small margins. Chrome for Developers notes that browser headers and footers may not display when the page margins leave too little room.
- Use the right scale: If the page is clipped horizontally, try fit-to-printable-area or a smaller custom scale. If text becomes too small, prefer landscape orientation or a larger paper size when appropriate.
- Check page breaks: Long tables, images, and wide code samples may split or move. Scroll through every preview page, not only the first.
- Decide about backgrounds: Printing backgrounds can preserve colored sections and charts but may use more ink or make text less readable. Firefox’s Simplified format cannot be combined with print backgrounds.
- Save a fresh copy after changes: Print settings may persist between attempts. Recheck the preview after changing headers, margins, format, or scale.
If you generate the page yourself and need custom page-margin content, CSS paged-media rules can place page counters in margins in supporting browsers. Chrome for Developers documents page counters and margin rules, as well as the need to leave margin room for browser headers and footers. Browser support and interaction with browser-generated headers vary, so test the actual target browser and PDF output before relying on CSS page numbers. Chrome for Developers: Add content to the margins of web pages when printed using CSS
Why are page numbers missing from my PDF?
| What you see | Likely cause | What to do |
|---|---|---|
| No page numbers in preview or PDF | Headers and footers are off, or the browser does not expose the setting in the place you expected. | Reopen the print dialog’s additional settings, enable the header/footer option, and confirm numbers in the preview before saving. |
| Numbers disappear when margins are reduced | The footer has no printable space. | Increase the bottom margin. Chrome may suppress its generated header/footer when margins are zero or too small. |
| Content is cut off at the right edge | The webpage is wider than the selected paper’s printable area. | Try landscape orientation, a suitable paper size, or fit-to-printable-area scaling; inspect the result for legibility. |
| Page breaks split a table, image, or paragraph | The site’s screen layout differs from its print layout, or the content does not fit on one printed page. | Change scale or orientation, try a simplified print format where available, and review the affected pages in preview. |
| The saved PDF differs from the preview you expected | A setting changed after preview, or the page finished loading/reflowing at a different time. | Wait for the page to finish loading, reopen preview, verify every page, and save again. |
| The page looks cluttered on paper | The site prints navigation, popups, or other screen-only elements. | Use a simplified format if your browser offers one. Edge Immersive Reader is another option on supported sites. |
Browser and device notes
The verified steps here cover desktop Chrome, Firefox, and Edge. Menu names and PDF destinations differ across operating systems and browser versions. Safari-specific page-number controls and mobile workflows are not covered by the sources used for this guide; check the print preview and the current browser’s own help rather than assuming another browser’s menu path applies.
Or skip the browser setup
For a clean webpage capture, ScreenshotNeo is a website screenshot API and MCP server. Its PDF capture supports paper size, margins, landscape orientation, and page ranges. The API can also return a screenshot image; for example, this one-call cURL request saves a WebP screenshot. See the ScreenshotNeo API documentation for PDF capture parameters and response details.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.
Create a free ScreenshotNeo account for 1,000 screenshots a month with no card.
FAQ
How do I add page numbers when saving a webpage as a PDF?
Enable the print dialog’s headers and footers option, then make sure the numbers appear in the preview. Edge explicitly describes this option as adding a page number to the footer.
Can I add page numbers to a PDF after I have saved it?
This guide covers numbering during browser printing. If the PDF is already saved, use a PDF editor that supports page numbering; the browser’s print setting applies when creating the PDF.
Will the PDF look exactly like the webpage?
Not always. Websites can use a different print layout, and print settings change pagination. Review the preview before saving.
Can I save only selected pages?
Firefox documents a Pages setting in its print dialog. Other browser dialogs may offer a page-range control; use the preview to confirm the selected pages and their numbering.


