# URL to PDF converter

**Use case:** 

Convert any web page to a PDF from its URL. Cookie banners are dismissed and lazy-loaded content is loaded before the page is rendered. Pick the paper size, paste one or many URLs and download each PDF through a direct link.

## Input

```json
{
  "urls": [
    {
      "url": "https://www.python.org"
    }
  ],
  "device": "desktop",
  "fullPage": true,
  "formats": [
    "pdf"
  ],
  "pdfFormat": "A4",
  "jpegQuality": 80,
  "includeHtml": false,
  "dismissCookieBanners": true,
  "blockTrackers": true,
  "darkMode": false,
  "delayMs": 1000,
  "waitUntil": "load",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "screenshotUrl": {
    "label": "Screenshot URL",
    "format": "string"
  },
  "pdfUrl": {
    "label": "PDF URL",
    "format": "string"
  },
  "title": {
    "label": "Page title",
    "format": "string"
  },
  "httpStatus": {
    "label": "HTTP status",
    "format": "integer"
  },
  "pageHeight": {
    "label": "Page height (px)",
    "format": "integer"
  },
  "error": {
    "label": "Error message",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Website Screenshot Generator: Full Page & PDF Actor is ready to run with the inputs already set for "URL to PDF converter". [Sign up or log in](https://console.apify.com/create-task-from-example/xo0Q60B8FJzPtYQg8) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "URL to PDF converter" task

The Website Screenshot Generator: Full Page & PDF Actor will start running based on the input automatically. You can also change all the input fields, like URLs, device, and more, to match your specific use case.

### 3. Receive the "URL to PDF converter" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as URL, status, screenshot url, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "URL to PDF converter" task via API](https://apify.com/jcwilk/website-screenshot.md).

## FAQ

### How do I convert a URL to PDF?

Paste the page URL into the URL to PDF task, keep pdf as the output format and run it. The result row has a direct pdfUrl link to download the PDF.

### Can I get a PDF and a PNG of the same page?

Yes. Select several formats, such as png and pdf, in the URL to PDF task and each URL returns a link for every format you chose.

### How much does a URL to PDF conversion cost?

The URL to PDF task costs $0.015 per PDF plus a run start fee of $0.0075 per GB of memory. Pages that fail to load cost $0.0035.

### Can I run it from the API, n8n, Make or a schedule?

Yes. The URL to PDF task runs from the Apify API, schedules and webhooks, and from n8n, Make or Zapier, and returns JSON, CSV or Excel.

## About this Actor

This example demonstrates how to use [Website Screenshot Generator: Full Page & PDF](https://apify.com/jcwilk/website-screenshot.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/jcwilk/website-screenshot.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/jcwilk/website-screenshot.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
