Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To turn a webpage into a paginated PDF with Browserless, send an authenticated POST request to its /pdf REST endpoint. Put the page URL in the JSON body, pass your Browserless token in the query string, and save the binary response as a .pdf file. Use /function with custom Puppeteer code instead if you need one continuous, extra-long page rather than ordinary PDF pages.

What you need

  • A Browserless API token from your Browserless account dashboard. Treat it as a secret; do not expose it in client-side code or commit it to a public repository.
  • A target page that the Browserless browser can access. For pages requiring authentication or additional loading time, configure the request with the relevant credentials or navigation controls.
  • A way to make an HTTPS POST request and save its response bytes to a file.

The examples below use Browserless’s documented SFO endpoint, https://production-sfo.browserless.io/pdf. Browserless identifies /pdf as the preferred REST endpoint and says /chromium/pdf is equivalent. Use the regional endpoint provided by Browserless documentation or your account configuration. See the Browserless PDF API documentation.

Generate a PDF with cURL

Replace the token and URL, then run this command in a shell. The -o option writes the response body to result.pdf; the endpoint returns PDF bytes, not a JSON object or base64 string.

curl -X POST 
  "https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE" 
  -H 'Content-Type: application/json' 
  -H 'Accept: application/pdf' 
  -d '{
    "url": "https://example.com/",
    "options": {
      "format": "A4",
      "printBackground": true,
      "displayHeaderFooter": true
    }
  }' 
  -o result.pdf

For example, replace https://example.com/ with the page you want to render. If the request succeeds, open result.pdf in a PDF reader to inspect page breaks, background graphics, and headers or footers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Generate a PDF with JavaScript or Python

JavaScript

This Node.js example sends JSON, reads the response as an ArrayBuffer, and writes the bytes to disk. It requires a Node.js version with the built-in fetch API.

import { writeFile } from 'node:fs/promises';

const response = await fetch(
  'https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Accept': 'application/pdf'
    },
    body: JSON.stringify({
      url: 'https://example.com/',
      options: {
        format: 'A4',
        printBackground: true,
        displayHeaderFooter: true
      }
    })
  }
);

if (!response.ok) {
  throw new Error(`Browserless returned HTTP ${response.status}: ${await response.text()}`);
}

await writeFile('result.pdf', Buffer.from(await response.arrayBuffer()));

Python

Install the requests package if needed, then write the response content in binary mode:

import requests

response = requests.post(
    "https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE",
    headers={
        "Accept": "application/pdf"
    },
    json={
        "url": "https://example.com/",
        "options": {
            "format": "A4",
            "printBackground": True,
            "displayHeaderFooter": True
        }
    },
    timeout=90,
)
response.raise_for_status()

with open("result.pdf", "wb") as pdf_file:
    pdf_file.write(response.content)

Check the HTTP response before saving a file in production code. An error response should be handled as an error, not mistaken for a valid PDF.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Choose the page content and PDF options

Provide a URL or HTML

The JSON body can contain a url to navigate to, or raw html to render. Use one or the other, not both; Browserless documents an error for malformed request data. The response is the generated PDF binary. Request and response details are in the PDF API reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set the page layout

PDF options let you control the printed page. Common choices include:

  • format for a paper size such as A4 or Letter.
  • width and height when you need explicit dimensions.
  • margin values to reserve space around page content.
  • landscape to use landscape orientation.
  • scale to adjust the rendered content size.
  • printBackground to include background graphics and colors.
  • displayHeaderFooter and header/footer templates for printed-page furniture.
  • pageRanges to select pages.
  • tagged to request structural tags in the output.

Browserless also documents controls for waiting until fonts are ready. CSS @page sizing can take precedence when configured to do so, so check the page’s print styles if your selected format or dimensions do not appear to take effect.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Handle dynamic pages

A page may not be ready at the same navigation event as another. Browserless supports waiting and navigation controls, as well as cookies, HTTP authentication, extra headers, scripts, styles, and other request configuration. Choose the controls that match how the target page loads rather than assuming its visible content is ready as soon as navigation starts. The available parameters are described in the PDF API documentation.

When you need a continuous long page

The REST /pdf endpoint produces conventional paginated PDFs; it does not produce one continuous PDF page containing an entire long webpage. Browserless explicitly notes this limitation in its PDF API documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a continuous page, use Browserless’s /function API and custom Puppeteer code to measure the rendered content and calculate a page height. This gives you control over the browser workflow, but you must implement the height calculation and PDF generation logic. For ordinary documents intended to print on A4, Letter, or another paper size, use /pdf.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Text, accessibility, and metadata

Browserless says Chrome’s print output contains real selectable text, rather than being only an image of the page. The tagged: true option adds structural tags, but Browserless does not describe the result as certified PDF/UA. Source markup affects output quality, and formal accessibility compliance should be validated with an appropriate checker.

The documented /pdf route does not set common document metadata such as Title or Author during generation. If those fields are required, generate the PDF and add metadata afterward with a PDF library such as pdf-lib.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common problems

  • Unauthorized response: Check that the token is valid, included as the token query parameter, and associated with the account and endpoint you intend to use.
  • Forbidden destination: The target may be disallowed or inaccessible from the service. Confirm the URL is correct and permitted, and check Browserless’s response details.
  • Malformed request: Ensure the body is valid JSON, the content type is application/json, and you supplied either url or html, not both.
  • Blank or incomplete output: The page may rely on delayed JavaScript, fonts, cookies, or authentication. Configure the relevant wait, cookie, header, or authentication options and check that the target loads in the intended session.
  • Timeout: A slow page or complex render may exceed the request’s available time. Review navigation and waiting settings; for a very long document, render page-range chunks where appropriate.
  • Rate limit or service error: Browserless documents rate-limit, internal-error, and unavailable status responses. Handle non-success HTTP statuses, apply an appropriate retry policy for transient failures, and avoid treating an error body as a PDF.
  • Unexpected page size: Check the selected format, dimensions, orientation, margins, scale, and the page’s CSS @page rules. CSS sizing may take precedence when configured.
  • One huge page was expected: This is not a layout option of the REST /pdf route. Use /function and implement custom Puppeteer height calculation instead.
  • Large multi-page document fails: Browserless’s PDF API guide advises splitting the render into pageRanges chunks and merging the resulting PDFs afterward.

The endpoint’s documented status categories include authorization, forbidden destination, not found, timeout, rate limit, internal error, and unavailable responses. Use the HTTP status and error details to distinguish a request problem from a temporary service problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Or skip the browser setup

For a screenshot or PDF from a URL without wiring up your own browser request, ScreenshotNeo offers a one-request API. This is an alternative screenshot/PDF workflow, not a Browserless endpoint.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/ -o page.pdf

See the ScreenshotNeo API documentation for the PDF output parameters and other options. 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, failed loads, timeouts, and cache hits are not billed. Its MCP server provides 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 with no card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan to try 1,000 shots a month with no card.

Frequently Asked Questions

Can Browserless generate a PDF from HTML instead of a live URL?

Yes. The request body can use raw HTML in place of the URL; do not send both fields in the same request.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I make the PDF searchable?

Browserless says its Chrome print output contains selectable text. Whether the resulting document is accessible or compliant with a formal standard still depends on the markup and validation.

Can the Browserless PDF endpoint set the PDF title or author?

Not during generation through the documented /pdf route. Add metadata afterward with a PDF library such as pdf-lib.

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.