apyhub
Cover illustration for How to Save a Webpage as a PDF (Chrome, Safari, iPhone, Android and API)
ApyHub

How to Save a Webpage as a PDF (Chrome, Safari, iPhone, Android and API)

How to Save a Webpage as a PDF (Chrome, Safari, iPhone, Android and API)

01Introduction

To save a webpage as a PDF, open the page, press Ctrl + P (Windows) or Cmd + P (Mac), choose Save as PDF as the destination, and click Save. Every major browser has this built in, so you don't need an extension or an online converter.

This guide covers the exact steps for each browser and phone, how to fix pages that come out cut off or broken, and how to convert webpages to PDF automatically when you need hundreds of them.

Jump to what you need:

02Save a webpage as a PDF on desktop

Chrome

  1. Press Ctrl + P (Windows) or Cmd + P (Mac).
  2. Set Destination to Save as PDF.
  3. Click Save and choose a folder.

Open More settings before saving to change paper size, margins, scale, and to turn on Background graphics if colors or images are missing.

Links stay clickable in PDFs saved from Chrome, so a saved article still opens its sources.

Microsoft Edge

  1. Press Ctrl + P.
  2. Set Printer to Save as PDF.
  3. Click Save.

On Windows you'll also see Microsoft Print to PDF in the printer list in any browser or app. It works too, but the browser's own Save as PDF option is usually better, since it keeps links clickable.

Firefox

  1. Press Ctrl + P (Windows) or Cmd + P (Mac).
  2. Set Destination to Save to PDF.
  3. Click Save.

Safari on Mac

  1. Go to File → Export as PDF.
  2. Name the file and click Save.

For more control over layout, use File → Print, then choose Save as PDF from the PDF menu in the bottom-left corner.

03Save a webpage as a PDF on iPhone and Android

iPhone and iPad (Safari)

The cleanest way is a full-page screenshot, which saves the whole page as one PDF without page breaks:

  1. Take a screenshot (Side button + Volume up).
  2. Tap the preview in the corner.
  3. Tap Full Page at the top.
  4. Tap Done, then Save PDF to Files.

You can also tap Share → Options → PDF, then save to Files.

Android (Chrome)

  1. Tap the ⋮ menu, then Share → Print.
  2. Set the printer to Save as PDF.
  3. Tap the PDF download button and choose where to save it.

Menu names can differ slightly between Android phone makers, but Print → Save as PDF is always there.

Need this for 100 pages, on a schedule, or from your app? Skip to converting webpages to PDF with an API.

04Fix a PDF that comes out cut off or broken

Browsers print webpages using the site's print styles, and many sites don't have good ones. These fixes cover most problems:

  • Text or tables cut off at the side: switch to Landscape, or lower Scale to 80–90% in More settings.
  • Missing colors, images or backgrounds: turn on Background graphics.
  • Ads, menus and pop-ups in the PDF: open the page in Reader mode first (Safari and Firefox have it built in, and Edge calls it Immersive Reader), then save.
  • Whole page as one long PDF without page breaks: on iPhone, use the Full Page screenshot above. On desktop, browsers always split into pages, so an online converter or an API is the simpler route.
  • Content missing at the bottom: scroll to the end of the page before saving, so images that load as you scroll have a chance to appear.
  • Page behind a login: the browser method works because you're signed in. Online converters and APIs can only see public pages.

05When the browser isn't enough

Ctrl + P is perfect for one page. It stops working when:

  • You need to save dozens or hundreds of pages, such as an archive of articles, documentation or product pages.
  • You need it to happen automatically: a receipt page saved as PDF after every order, a weekly snapshot of a competitor's pricing page, or a compliance record of what your terms page said on a given date.
  • An app or an AI agent needs to create the PDF, not a person.

That's where a webpage to PDF API comes in. You send a URL, and a headless browser on the server renders the page and gives you back the PDF.

06Use an online webpage to PDF converter

If you'd rather paste a URL than use the print dialog, for example to get the same result on any device, open the Webpage to PDF converter on ApyHub. With a free account, paste the page's URL, click Send request, and open the PDF link it returns. No code needed, and it's the same API the next section shows how to automate.

07Convert webpages to PDF automatically with an API

ApyHub's Convert Webpage to PDF API takes a public URL and returns the PDF as a download or a signed link. One request:

· bash
curl -X POST "https://api.eu.apyhub.com/apyhub/capture-public-url-as-pdf/link?landscape=true" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.rfc-editor.org/rfc/rfc9110.html"}'

The response is a link to the finished PDF:

· json
{
  "data": "https://apyhub-outgoing.s3.eu-west-1.amazonaws.com/.../pdf_convert_2026-10-20_c2b464aa.pdf?X-Amz-Expires=900&..."
}

Two optional settings match the browser fixes above: landscape=true for wide pages, and margin (from 0 to 1, default 0.1) to control the white space around the page. The link expires after 15 minutes (X-Amz-Expires=900), so download the file or copy it to your own storage.

Save a list of webpages as PDFs in Python

This script takes a list of URLs and saves each one as a PDF:

· python
import os
import requests

API = "https://api.eu.apyhub.com/apyhub/capture-public-url-as-pdf/link"
HEADERS = {"apy-token": os.environ["APY_TOKEN"]}

urls = [
    "https://example.com/pricing",
    "https://example.com/terms",
]

for i, url in enumerate(urls, start=1):
    r = requests.post(API, headers=HEADERS, json={"url": url}, timeout=120)
    if r.status_code != 200:
        print(f"Skipped {url}: {r.json()}")
        continue
    pdf = requests.get(r.json()["data"], timeout=60)
    with open(f"page-{i}.pdf", "wb") as f:
        f.write(pdf.content)
    print(f"Saved {url} as page-{i}.pdf")

Run it on a schedule (cron or GitHub Actions) and you have an automatic archive.

What it can't do: the API sees the page the way a logged-out visitor does, so pages behind a login won't work. Some sites also block automated browsers. In our test, a Wikipedia article was rejected with "The url is either missing or is not accessible", while the same request for RFC 9110 and our own blog worked. The script above skips those pages and keeps going.

Each conversion costs 50 atoms. If your content starts as HTML rather than a live URL, for example an invoice template, use the HTML to PDF API instead.

Try the Webpage to PDF API free →

08Let an AI agent save pages for you

The API is also available through ApyHub MCP, so AI assistants such as Claude, ChatGPT, Cursor or Mistral Le Chat can call it directly. Ask "save these five articles as PDFs" and the assistant calls the converter once per link and hands you the files, with no script to write.

To test the request before building anything, save it in Voiden, a free, open-source API client that stores requests as Markdown files in your repo, so the working request is ready to reuse.

09Conclusion

For one page, your browser is all you need: Ctrl + P or Cmd + P, then Save as PDF. On iPhone, the Full Page screenshot gives you the whole page as a single PDF. If the result comes out cut off, switch to landscape, lower the scale or use Reader mode. When you need many pages, a schedule or an app doing the work, a webpage to PDF API turns each URL into a PDF with one request.

Start free on ApyHub, no card required →

10FAQ

How do I save a webpage as a PDF?

Press Ctrl + P (Windows) or Cmd + P (Mac), set the destination to Save as PDF, and click Save. This works in Chrome, Edge, Firefox and Safari.

How do I save a webpage as a PDF in Chrome?

Press Ctrl + P or Cmd + P, set Destination to Save as PDF, and click Save. Open More settings to change margins, scale or background graphics.

How do I save a webpage as a PDF on iPhone?

Take a screenshot in Safari, tap the preview, choose Full Page, then tap Done and Save PDF to Files. This saves the whole page as one PDF.

How do I save a webpage as a PDF without it getting cut off?

Switch to landscape, lower the scale to 80–90%, and turn on background graphics. Reader mode also removes layouts that print badly.

Can I save a whole webpage as a single page PDF?

On iPhone, yes, with the Full Page screenshot. Desktop browsers always split the page into sheets, so use an online converter or an API for a single long page.

Why can't I save a webpage as a PDF in Chrome?

Some sites block printing or use print styles that hide content. Try Reader mode, another browser, or a webpage to PDF converter.

How do I convert many webpages to PDF at once?

Use a webpage to PDF API in a short script, like the Python example above. It loops through your URLs and saves each one as a PDF.

Is there a free webpage to PDF converter?

Yes. Your browser's Save as PDF option is free. For a paste-a-URL converter, the ApyHub Webpage to PDF API page works on the free plan.

Do links still work in a PDF saved from a webpage?

In Chrome, Edge and Firefox, yes: links stay clickable when you use Save as PDF. Microsoft Print to PDF doesn't keep them.

Can I convert a page that needs a login?

The browser method works because you're signed in. Online converters and APIs only see public pages.

11About ApyHub

ApyHub is a curated API catalog and the trusted operational layer between your application and the services it depends on. One subscription, billed in atoms, covers the whole catalog of over 1,500 endpoints and capabilities, and it keeps growing. Every service is evaluated before it is listed and carries machine-readable certification covering GDPR, SOC 2 and ISO 27001. Every endpoint is MCP-ready by default. ApyHub runs dedicated EU and US regions and serves more than 65,000 developer workspaces every month. Start on the free tier with no card, or publish your own API on ApyHub.

12Sources