# HTML string to PDF converter

**Use case:** 

Convert pasted HTML into a polished PDF report with Letter format, landscape orientation, margins, and background colors.

## Input

```json
{
  "inputType": "html",
  "html": "<html><body><h1>Weekly Sales Report</h1><p>Pipeline grew 18% this week.</p><table><tr><th>Region</th><th>Revenue</th></tr><tr><td>EMEA</td><td>$42,000</td></tr></table></body></html>",
  "url": "https://apify.com",
  "urls": [
    "https://apify.com",
    "https://apify.com/store"
  ],
  "pageFormat": "Letter",
  "landscape": true,
  "marginTop": "0.5in",
  "marginBottom": "0.5in",
  "marginLeft": "0.5in",
  "marginRight": "0.5in",
  "printBackground": true,
  "scale": 1,
  "headerTemplate": "",
  "footerTemplate": "",
  "displayHeaderFooter": false,
  "waitForSelector": "",
  "waitForTimeout": 0,
  "outputFileName": "sales-report",
  "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.