# Webpage to PDF converter task

**Use case:** 

Convert any public webpage into a PDF with A4 page size, margins, background graphics, and a custom output filename.

## Input

```json
{
  "inputType": "url",
  "html": "<h1>Hello, World!</h1><p>This is a PDF generated from HTML.</p>",
  "url": "https://apify.com/",
  "urls": [
    "https://apify.com",
    "https://apify.com/store"
  ],
  "pageFormat": "A4",
  "landscape": false,
  "marginTop": "10mm",
  "marginBottom": "10mm",
  "marginLeft": "10mm",
  "marginRight": "10mm",
  "printBackground": true,
  "scale": 1,
  "headerTemplate": "",
  "footerTemplate": "",
  "displayHeaderFooter": false,
  "waitForSelector": "",
  "waitForTimeout": 0,
  "outputFileName": "webpage-pdf",
  "fullPage": false
}
```

## Output

```json
{
  "index": {
    "label": "#",
    "format": "number"
  },
  "source": {
    "label": "Source",
    "format": "text"
  },
  "pdfKey": {
    "label": "PDF Key",
    "format": "text"
  },
  "pdfUrl": {
    "label": "PDF URL",
    "format": "link"
  },
  "fileSizeKb": {
    "label": "Size (KB)",
    "format": "number"
  },
  "success": {
    "label": "Success",
    "format": "boolean"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [HTML to PDF Converter](https://apify.com/automation-lab/html-to-pdf-converter) with a specific input configuration. Visit the [Actor detail page](https://apify.com/automation-lab/html-to-pdf-converter) to learn more, explore other use cases, and run it yourself.