ScreenshotNeo

BlogHow-to

How to convert a website URL to PDF with CloudConvert

Create a PDF from a website URL with CloudConvert’s capture-website API. Learn how to download the result, handle common issues, and choose an alternative.

By the ScreenshotNeo team4 October 20266 min read

To convert a website URL to PDF with CloudConvert, create a job containing a capture-website task with the page URL and output_format set to pdf. Add an export/url task, wait for the job to finish, then download the exported PDF. CloudConvert documents this workflow in its Capture Website operation.

Use CloudConvert’s API

This approach suits developers who need to generate PDFs from URLs in an application or repeat the conversion programmatically. You will need a CloudConvert account and API key. Keep the key on a server or in a secret manager; do not expose it in browser-side code.

  1. Choose the complete page URL, including its scheme, such as https://example.com/report.
  2. Create a job with a capture-website task. Set the task’s URL and PDF output format.
  3. Add an export/url task that depends on the capture task.
  4. Wait for the job to complete and read the export task’s file URL.
  5. Download the PDF promptly, then inspect its content and page breaks.

The operation accepts a URL and output format, and documents engine, engine-version, and filename fields. Check the current operation schema for exact field names, required values, and supported options before deploying an integration.

Job structure

A job is a set of named tasks. The capture task produces the PDF; the export task makes that output available for download. The following illustrates the documented task pattern. Replace the placeholder API key and confirm the request shape against CloudConvert’s current API documentation before using it in production.

{
  "tasks": {
    "capture": {
      "operation": "capture-website",
      "url": "https://example.com/report",
      "output_format": "pdf",
      "filename": "report.pdf"
    },
    "export": {
      "operation": "export/url",
      "input": "capture"
    }
  }
}

Submit this job to CloudConvert’s job API with your API key as documented by CloudConvert. A job may run asynchronously: poll or use the completion mechanism you choose, then obtain the URL from the completed export task. Do not assume the file is ready just because the job was accepted.

Download with cURL

CloudConvert’s operation documentation also provides a CLI example. The request below shows the general job submission shape; use the API version and authentication format in the current documentation. Save the completed export URL from the response before downloading.

curl -X POST "https://api.cloudconvert.com/v2/jobs" \
  -H "Authorization: Bearer $CLOUDCONVERT_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
    "tasks": {
      "capture": {
        "operation": "capture-website",
        "url": "https://example.com/report",
        "output_format": "pdf",
        "filename": "report.pdf"
      },
      "export": {
        "operation": "export/url",
        "input": "capture"
      }
    }
  }'

After the job reports completion, download the file using the URL in the export task. Treat that URL as temporary and avoid logging it where it could be exposed.

Choose the right conversion workflow

Need CloudConvert path
Convert pages from your application Create API jobs with capture-website and an export task.
Add “Download as PDF” to your own site Consider CloudConvert signed URLs. They are designed for on-demand conversions using URL parameters and a signature.
Convert a protected page The HTML-to-PDF API describes custom authorization headers for protected resources.
Wait for dynamic content The API describes waiting for a CSS selector to appear. Confirm current parameter names and constraints in the docs.
Control page layout The product page describes page size, margins, zoom, headers and footers. Verify the current API options for your chosen operation.
Meet a regional processing requirement Check account settings and endpoint documentation; the default region is selected based on the caller’s IP unless account settings override it.

CloudConvert describes its HTML-to-PDF API as using headless Chrome and supporting JavaScript and custom fonts. That does not guarantee identical rendering on every site. Dynamic pages, fonts, long documents, and page-break behavior should be checked in the resulting PDF.

Or skip the browser setup

If your goal is a clean screenshot rather than a paginated PDF, ScreenshotNeo offers a one-request website capture API and an MCP server for AI agents. Its API returns PNG, JPEG, WebP, or PDF output. For a PDF, add the PDF format option as described in the ScreenshotNeo API docs.

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 gives AI agents tools for screenshots, page information, and PDF capture. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

Privacy, download lifetime, and cost

CloudConvert says selected files are transferred to and temporarily stored on its servers. Review its Privacy Policy and your own data-handling requirements before sending sensitive pages or content. Its docs say export URLs and associated tasks are automatically deleted after 24 hours, so download the PDF promptly. This is the documented lifetime for the export URL and tasks; it does not establish a retention period for every kind of submitted data.

CloudConvert’s HTML-to-PDF API page displayed a starting price of $0.008 per file when reviewed for this article on October 3, 2026. Pricing can change, so check the current HTML-to-PDF API pricing before estimating production costs.

For API processing, CloudConvert documents a default endpoint that selects the nearest processing region based on the caller’s IP, unless account settings override it. Its documentation lists eu-central in Germany and us-east in Virginia, USA. Check the current API introduction and account configuration if regional processing matters.

Troubleshooting

Symptom Likely cause What to do
The job is accepted but there is no PDF yet Job creation is asynchronous; acceptance does not mean the tasks finished. Wait for job completion using the documented polling or webhook flow, then read the completed export task.
The export has no downloadable URL The export task may not have completed, or its input may not reference the capture task. Inspect task status and errors. Ensure the export task takes the capture output as input.
The page is blank or missing content The page may depend on JavaScript, delayed loading, authentication, or content that appears only after an interaction. Check whether the URL is accessible to the conversion service. Use documented authorization headers or wait-for-selector behavior where appropriate, then inspect the generated PDF.
Fonts or layout differ from the browser Fonts, responsive breakpoints, dynamic content, and print pagination can affect rendering. Check the PDF at the intended page size and zoom. Confirm fonts load, and adjust documented page and margin settings if available.
The export link no longer works CloudConvert documents automatic deletion of export URLs and associated tasks after 24 hours. Download the file promptly after completion and store it in your own approved storage if you need it later.
A regional requirement is not met The default region is selected from the caller’s IP unless account settings override it. Review account settings and current endpoint documentation before processing the job.

Performance and reliability checklist

  • Use the simplest page URL that reproduces the content you need; avoid unnecessary query parameters.
  • For content rendered after navigation, use the documented wait-for-selector option when applicable and select an element that indicates the page is ready.
  • For long pages, check multiple pages of the resulting PDF for clipping, repeated headers, and awkward breaks.
  • Handle task failures and timeouts in your application, and make retries deliberate so a transient failure does not create uncontrolled duplicate work.
  • CloudConvert documents a default task timeout of five hours. This is a configured maximum, not a normal completion-time estimate.
  • Use completion webhooks or an appropriate asynchronous flow for application integrations; the HTML-to-PDF API page also describes synchronous processing.

CloudConvert describes its conversion service as powered by headless Chrome, but no rendering path can guarantee a perfect result for every site. Treat the output PDF as something to validate, especially when it is a customer-facing document or an archival record.

FAQ

Can I convert a page that requires authentication?

CloudConvert’s HTML-to-PDF API describes support for custom authorization headers for protected resources. Confirm the current API parameter details and ensure the credentials are appropriate to share with the conversion service.

Can I add a PDF download button to my own website?

CloudConvert documents signed URLs for on-demand conversions configured through URL parameters and an encrypted signature. This is intended for website integration; review the signed URL setup documentation before exposing the feature.

Does a successful job guarantee the PDF looks exactly like the page?

No. Rendering depends on the page, its timing, fonts, viewport, and pagination. Inspect the output rather than assuming the browser view and PDF will match.

Where can I check the current API fields?

Use CloudConvert’s Capture Website operation reference and the current API docs for job and export behavior.