ScreenshotNeo

BlogHTML to image & PDF

Convert a Web Page URL to PDF

Learn the fastest ways to save any web page as a PDF, from browser print dialogs to automated URL capture with ScreenshotNeo.

By the ScreenshotNeo team1 October 20267 min read

Direct answer: Open the web page in your browser, choose Print, select Save as PDF (or the equivalent PDF destination), then save the file. This is the quickest method for a single page. For repeatable or server-side conversion, use a browser automation tool or a URL-to-PDF API.

1. Save the current page with your browser

This method works on most desktop browsers, although menu names vary by operating system and browser version.

  1. Open the page you want to convert.
  2. Open the browser’s Print command.
  3. Choose Save as PDF or another PDF destination.
  4. Set the page size, orientation, margins, scale, and background graphics if those controls are available.
  5. Preview the pages, then save the PDF.

A browser print operation converts responsive HTML and CSS into fixed pages. Columns can wrap, long tables can split, and content that fits on a wide screen can be scaled down or clipped. Preview the result before sharing it. Adobe documents browser Print > Save as PDF as a basic HTML-to-PDF option: Adobe’s HTML-to-PDF guide.

2. Save a page as PDF on Chrome for Android

Google’s documented Chrome flow is:

  1. Open the page in Chrome.
  2. Tap More.
  3. Tap Share, then choose Print.
  4. In the printer options, select Save as PDF.
  5. Choose a location and save the file.

Device manufacturers and Chrome versions can change the exact screen layout. If you do not see these labels, look for Print in the Share sheet. See Google’s Chrome Android instructions.

3. Convert a URL with Adobe Acrobat

Acrobat is useful when you need to enter a URL directly, capture more than one linked level, or tune conversion settings.

  1. In Acrobat desktop, choose Create and then Web page.
  2. Enter the web page URL or browse to an HTML file.
  3. Choose how many levels to capture. Use Get entire site only when you really need a site-wide crawl.
  4. For multi-level captures, set restrictions such as staying on the same path or the same server.
  5. Start the conversion and inspect the resulting PDF.

A single-page conversion and a multi-page crawl are different jobs. A crawl can miss pages when links leave the allowed path or server, and it is not automatically a full-fidelity archive. Acrobat’s instructions cover URL entry, levels, and crawl restrictions in Convert web pages to PDFs.

4. Fix layout before you save

PDF output is controlled by the source page and the conversion settings. When the first result is hard to read, adjust these settings and generate it again:

Problem Setting to try
Wide table or two-column article is clipped Landscape orientation, larger paper size, or scale-to-fit
Text is too small Reduce margins, use portrait only when the content is narrow, or remove unnecessary columns
Blank colored sections disappear Enable page backgrounds or background graphics
Images are missing or low quality Enable image inclusion and use the source page at its intended viewport
Navigation makes the PDF noisy Hide or remove headers, footers, sidebars, and other non-content elements before printing
Long document is difficult to navigate Enable bookmarks or tagged PDF output when the converter supports it

Adobe lists controls for images, backgrounds, bookmarks, tags, headers and footers, page size, orientation, margins, and scaling in its web-page conversion settings reference.

5. Automate conversion in code

For scheduled jobs, batch work, or an application feature, a browser-based converter needs to load the page, wait for client-side rendering, and print the result. A typical automation flow is:

  1. Launch a headless browser.
  2. Navigate to the URL.
  3. Wait for the page’s required content or network activity.
  4. Set the paper format, margins, orientation, and background printing.
  5. Call the browser’s PDF function and save the bytes.

Account for pages that require JavaScript, authentication, cookies, consent dialogs, lazy-loaded images, or a user action. The exact code depends on the browser library and runtime; for production jobs, make the wait condition explicit instead of relying only on a fixed delay.

6. Edge cases to check

  • JavaScript-rendered content: The HTML response may not contain the article. Wait until the relevant selector appears.
  • Lazy images: Scroll or wait for images to load before printing.
  • Cookie and newsletter overlays: Dismiss them or hide their selectors before capture.
  • Authentication: Supply the required session cookies or headers in a controlled environment.
  • Infinite scroll: A print operation may capture only the initially rendered section. Use a controlled scroll-and-wait routine.
  • Cross-origin frames: Embedded content can have separate loading and permission rules.
  • Video and animation: A PDF contains a static frame, not playable media. Pause or hide moving elements when a consistent page is required.
  • Print CSS: Sites often define a separate @media print layout. Compare screen and print previews.
  • Private or sensitive URLs: Do not send confidential pages to an online converter unless its access, retention, and deletion policies meet your requirements.

7. Or skip the browser setup

ScreenshotNeo provides a URL capture API that can return a PDF as well as PNG, JPEG, or WebP images. It handles browser setup for you and exposes controls for full-page capture, lazy-loaded images, custom CSS and JavaScript, clicks, waits, headers, cookies, user agents, authorization, timezone, geolocation, resource blocking, caching, asynchronous jobs, signed webhooks, and bulk capture. See the ScreenshotNeo API documentation for the PDF options such as paper size, margins, landscape mode, and page ranges.

curl -G "https://api.screenshotneo.com/v1/shot" \
  -d access_key=YOUR_API_KEY \
  --data-urlencode url=https://stripe.com \
  -o shot.webp
import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({
  access_key: 'YOUR_API_KEY',
  url: 'https://stripe.com'
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const bytes = Buffer.from(await res.arrayBuffer());

For a PDF response, use the PDF output option documented by ScreenshotNeo and save the response with a .pdf extension. The same endpoint supports the capture settings you need for rendered pages.

Cookie and consent banners are accepted before capture, then more than 60 known consent platforms, newsletter popups, and chat widgets are removed. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed; each response reports the result in X-Page-Verdict and X-Billed headers. ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

The Free plan includes 1,000 shots per month without a card. Paid plans start at $5 for 3,000 shots, and every feature is available on every plan. Create a free ScreenshotNeo account.

8. Performance, reliability, and cost

  • Reduce work: Capture one page when that is all you need. Multi-level or entire-site jobs load more URLs and take longer.
  • Use a precise wait: Waiting for a selector or network idle is usually more reliable than guessing a delay, while an excessive delay increases job time.
  • Control page weight: Block advertising, trackers, or unnecessary resource types when they are not part of the document.
  • Cache deliberately: A cache TTL can reduce repeated captures when the source does not change frequently. Lower the TTL when freshness matters.
  • Make retries safe: Retry transient navigation failures with a limit and log the URL, status, and verdict. Avoid creating duplicate downstream records when a job is retried.
  • Watch PDF size: Large images, backgrounds, and long pages increase output size. Resize images or remove decorative elements when distribution size matters.
  • Budget by successful work: ScreenshotNeo bills only clean shots; failed loads, bot checks, blank pages, timeouts, and cache hits are free.

9. Troubleshooting

Symptom Likely cause Fix
PDF is blank The page failed to load, requires JavaScript, or was captured before rendering Wait for a content selector or network idle; verify the URL in a normal browser
Content is cut off Print area, orientation, or scale does not fit the layout Use landscape, a larger paper size, reduced margins, or scale-to-fit
Images are absent Images are lazy-loaded, blocked, or still downloading Wait for the image selector, scroll to trigger lazy loading, and check resource blocking
Cookie banner covers text Consent UI was not dismissed Accept or close it before printing, or hide the banner selector
Only the first part of an infinite page appears More content is inserted during scrolling Scroll in steps and wait for new content before generating the PDF
Protected page returns an error Authentication, authorization, or bot checks block the request Use an authenticated session or the required headers and cookies; do not try to bypass access controls
ScreenshotNeo response is not a PDF The request is using the default image output Set the documented PDF output option and save the response as .pdf
API request times out The page is slow, blocked, or waiting on an unavailable resource Check the URL, reduce unnecessary resources, use an explicit wait, and retry transient failures
Repeated captures are slow or costly Every request reloads an unchanged page Enable caching with a suitable TTL or use an asynchronous job for background processing

10. FAQ

Can I convert a URL to PDF without installing software?

Yes. Use the browser’s Print command and choose Save as PDF. A hosted API is another option when you need automation.

Will the PDF look exactly like the web page?

No guarantee applies to every site. PDF is paginated, while a web page is responsive. Print CSS, dynamic content, fonts, and overlays can change the result.

How do I convert several linked pages?

Use a converter that supports crawl levels or an entire-site capture, and restrict it to the required path and server. Review the result because links and site structure determine coverage.

Can a PDF contain interactive forms or video?

The conversion produces a static document unless the converter specifically preserves PDF form fields. Video and animation are represented as static content.

How do I create PDFs from URLs in an AI workflow?

Use ScreenshotNeo’s MCP server and its capture_pdf tool from an MCP-compatible client such as Claude or Cursor.