DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk7 min

How to Convert a URL to PDF with the ScreenshotMachine API

Send a GET request with ScreenshotMachine’s customer key and target URL, then save the response bytes as a PDF. Configure page size, rendering mode, timing, and page state as needed.

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 convert a webpage to PDF with ScreenshotMachine, send a GET request to https://pdfapi.screenshotmachine.com/ with your customer key as key and the page address as url. Save the response body as a .pdf file. The service renders the webpage; it does not convert a local browser tab or an existing file.

Make a basic URL-to-PDF request

First obtain a ScreenshotMachine customer key through its account flow. Keep the key on a server or in a protected local environment; do not put it in public client-side code or commit it to a public repository. The PDF API guide documents key and url as the required parameters.

As an Amazon Associate I earn from qualifying purchases.

This cURL command encodes both parameter values and writes the response to output.pdf:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://pdfapi.screenshotmachine.com" 
  --data-urlencode "key=YOUR_CUSTOMER_KEY" 
  --data-urlencode "url=https://example.com" 
  > output.pdf

Replace the key and example address with your own. The documented endpoint also appears with a trailing slash; use the endpoint form shown in the official ScreenshotMachine PDF API guide. The official examples show downloading or streaming the generated output. Check the saved file with a PDF reader before relying on it in a production workflow.

#1 Best Overall
Sale
Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner
  • PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
  • QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
  • VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
  • INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
  • EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0

What the command does

  1. -G makes cURL send the parameters as a GET query.
  2. --data-urlencode encodes parameter values, including the webpage URL.
  3. > output.pdf redirects the response body to a file. It does not print the document to your terminal.

The API documentation describes the request inputs and output examples, but does not establish a response-code contract or detailed error taxonomy. If you need programmatic error handling, verify the current API behavior with the vendor rather than assuming every response is a PDF.

Choose the PDF layout and page state

Begin with the defaults, then change only the options that address a concrete rendering need. ScreenshotMachine’s API documentation describes these parameters:

Parameter Documented behavior When to change it
paper Defaults to letter. Listed choices include legal, ledger, tabloid, and ISO A0–A6. Match the intended print or reading format.
orientation portrait is the default; landscape is also supported. Use landscape for content whose width is more important than its height.
media Defaults to screen. screen retains browser-like appearance; print removes web-specific graphics or elements not needed for print. Choose whether on-screen fidelity or print-oriented styling matters more.
bg Defaults to bg, which includes the page background; nobg omits it. Omit backgrounds when you want a simpler document or do not need background styling.
delay Defaults to 200 ms. Documented values range from 0 to 10000 ms in 200 ms increments. Add wait time if a page animation or delayed rendering needs to finish before capture.
scale Defaults to 100%; documented values range from 10 to 200. The vendor notes that a smaller scale can reduce page count. Adjust content zoom when layout or pagination needs correction.
click Accepts a CSS selector for an element to click before capture. Use when a page interaction, such as a consent choice, must occur before rendering.
hide Accepts comma-separated CSS selectors for elements to hide. Remove an overlay or other unwanted element from the captured page.

For example, add the documented parameters to the cURL request as additional encoded values. The exact selector and option values depend on the target page:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
  • FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
  • READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
  • WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
  • OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)
curl -G "https://pdfapi.screenshotmachine.com" 
  --data-urlencode "key=YOUR_CUSTOMER_KEY" 
  --data-urlencode "url=https://example.com" 
  --data-urlencode "paper=A4" 
  --data-urlencode "orientation=portrait" 
  --data-urlencode "media=print" 
  --data-urlencode "bg=bg" 
  --data-urlencode "delay=1000" 
  --data-urlencode "scale=100" 
  > output.pdf

Use a delay only if the page needs it: a larger delay adds time to the request and cannot guarantee that a page’s own asynchronous content has finished. The documented delay values advance in 200 ms increments.

Pass cookies, language, and browser context

The API guide also documents cookies, accept-language, and user-agent for shaping the request context. Cookies are a semicolon-separated list of name-value pairs. Use URL encoding for values containing reserved characters; passing raw punctuation in query values can change how the request is parsed.

curl -G "https://pdfapi.screenshotmachine.com" 
  --data-urlencode "key=YOUR_CUSTOMER_KEY" 
  --data-urlencode "url=https://example.com/account" 
  --data-urlencode "cookies=session=VALUE; preference=VALUE" 
  --data-urlencode "accept-language=en-US" 
  --data-urlencode "user-agent=Mozilla/5.0" 
  > account.pdf

Only send cookies you are authorized to use, and treat session values as credentials. The click and hide options can help with consent banners or other page elements, but select a click action carefully: it may change page state before the PDF is produced.

Protect requests made from public pages

A customer key embedded in public HTML can be copied and reused by others. The vendor’s guide describes an optional hash for requests originating in public HTML: calculate the MD5 digest of the exact url parameter value concatenated with the account’s secret phrase, then send that digest as hash. When a secret phrase is configured in account settings, the documentation says missing or incorrect hashes are ignored. That behavior is not equivalent to protecting a secret kept in a server-side integration, so avoid exposing the secret phrase itself.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
  • STAY ORGANIZED – Easily convert your paper documents into digital formats like searchable PDF files, JPEGs, and more.Power Consumption : 2.5W or less (Energy Saving Mode: 0.7W). Suggested Daily Volume : 500 scans..Does it contain liquid: no
  • CONVENIENT AND PORTABLE –lightweight and small in size, you can take the scanner anywhere from home offices, classrooms, remote offices, and anywhere in between
  • HANDLES VARIOUS MEDIA TYPES – Digitize receipts, business cards, plastic or embossed cards, reports, legal documents, and more
  • FAST AND EFFICIENT – No technical hurdles or complicated setups here; easily scan both sides of a document at the same time, in color or black-and-white, at up to 12 pages-per-minute, and with a 20 sheet automatic feeder
  • BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer

Be precise about the URL used in the calculation: the documented input is the exact URL parameter value concatenated with the secret phrase. If you encode or normalize the URL differently between calculating the hash and making the request, the values may not match. Consult the current API instructions for the vendor’s hash example and account-specific setup.

Use the language examples or SDKs

The official API page includes examples for Bash, Node.js, Python, PHP, Java, C#, Perl, and VB. Its Node.js example uses the official package to generate the API URL and pipe the returned stream to a file. The vendor’s Python example repository demonstrates building options, generating the API URL, and saving the output: screenshotmachine-python on GitHub. Prefer a standard URL/query encoder or the vendor’s SDK over assembling a query string by hand.

When using a language HTTP client, request the endpoint with key and url, then write the response bytes—not a text-decoded response—to a file opened in binary mode. The vendor documentation does not establish a specific timeout guarantee, PDF size limit, or retention policy, so check with ScreenshotMachine if those properties are requirements for your application.

Rank #4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
  • IRIScan Express, portable scanner : scans color and black and white documents a blazing speed up to 8ppm simplex. Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • IRIScan Express mobile scanner is powered via an included micro USB 2. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan. USB cable provided. AC Adapter not provided and not needed.
  • IRIScan flatbed scanner uses a simplex scanning mode allows for quick and straightforward scanning of single-sided documents. IRIScan with its full portable features is the ideal document scanners for computers.
  • IRIScan document scanner : Versatile scanning capabilities, including scanning to Word, PDF, and Excel formats with companion software provided Readiris OCR
  • Receipt scanner and card scanner with Additional features include scanning business cards directly to Outlook, photo scanning, and receipt scanning for efficient document management
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common implementation problems

  • The saved file is not a readable PDF: Confirm the request URL and parameters, and inspect the HTTP response before treating its body as a document. The available API guide does not provide a full error-code mapping.
  • The target URL includes query parameters or punctuation: Encode the entire url value using cURL’s --data-urlencode or your language’s query-encoding utility. Do not concatenate an unescaped webpage URL into the API endpoint.
  • A selector with # or other reserved characters behaves unexpectedly: Encode the click or hide value as a query parameter. The guide specifically calls out percent-encoding selector values and other reserved characters.
  • The page is captured before an animation or delayed content appears: Increase delay within the documented 0–10000 ms range, using 200 ms increments. A delay is a wait, not proof that every page resource has loaded.
  • The PDF looks unlike the webpage: Compare media=screen with media=print, and check whether bg or nobg matches the intended output. Adjust paper, orientation, and scale for pagination.
  • A consent banner or overlay obscures content: Try a suitable click selector if the page has an actionable control, or a hide selector if removal is appropriate. Selectors are page-specific.
  • A signed public request is rejected or behaves inconsistently: Check that the hash uses the exact URL parameter value plus the configured secret phrase, and that the URL sent is the value used to calculate it. Keep the phrase private.

Or skip the browser setup

If you want a screenshot or PDF workflow without building and maintaining the rendering request yourself, ScreenshotNeo is a website screenshot API and MCP server. Its one-call endpoint returns a clean screenshot in PNG, JPEG, or WebP, or a PDF. For a PDF response, save the returned bytes with a .pdf filename; its documented API call uses the url parameter and your access key:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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 output and request options. ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. It also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents. The Free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo free: 1,000 screenshots a month, no card required.

Frequently Asked Questions

Does ScreenshotMachine take a URL or a local HTML file?

The documented PDF endpoint takes a webpage address in its `url` parameter; the guide does not establish a local-file input workflow.

Best Value
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images

Can I use a URL that does not include `https://`?

The guide says the scheme prefix is optional, but including `https://` makes the target address explicit.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

What does ScreenshotMachine document about storing generated PDFs?

The API examples show saving or streaming the response, but the available documentation does not establish a data-retention policy.

Quick Recap

SaleBestseller No. 3
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
Canon imageFORMULA R10 - Portable Document Scanner, USB Powered, Duplex Scanning, Document Feeder, Easy Setup, Convenient, Perfect for Mobile Users, White
BROAD COMPATIBILITY – Works with both Windows and Mac devices, be it laptop or computer; This product is not intended for scanning photographs on photo paper / photographic media
$153.00
Bestseller No. 4
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
IRIScan Express 4 Black Compact Portable USB Simplex Document Scanner, 8 PPM for Contracts, Invoices and Business Cards, Compatible with Windows, Readiris PDF Included
Find our Software here : irislink.com/start; IRIScan Express is only compatible Windows platform and not macintosh
$129.00
Bestseller No. 5
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
Scanner type: Document; Connectivity technology: USB; With Auto Scan Mode, the scanner automatically detects what you're scanning
$75.00

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.