---
title: Convert HTML to PDF API
slug: convert-html-to-pdf
url: https://apyhub.com/apyhub/service/convert-html-to-pdf
provider: ApyHub
categories: [File Conversion]
auth: api_key
---

# Convert HTML to PDF API

Convert HTML from a URL, base64 string, or file upload into PDF bytes or a signed link. Useful for invoices, reports, and printable web pages.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/convert/html-url/pdf-url` | What it does Converts a remote HTML file at the given URL into a PDF and returns a signed PDF link.… | 100 |
| POST | `/convert/html-base64/pdf-file` | What it does Converts a base64-encoded HTML file into a PDF and returns the PDF as a download. The… | 100 |
| POST | `/convert/html-base64/pdf-url` | What it does Converts a base64-encoded HTML file into a PDF and returns a signed link to the genera… | 100 |
| POST | `/convert/html-file/pdf-file` | What it does Uploads an HTML file and returns the generated PDF as a binary download. Query Paramet… | 100 |
| POST | `/convert/html-file/pdf-url` | What it does Converts an uploaded HTML file into a PDF and returns a signed link to the generated P… | 100 |
| POST | `/convert/html-url/pdf-file` | What it does Converts a remote HTML file accessible by URL into a PDF download. The request accepts… | 100 |

## About

## What it does
HTML to PDF converts HTML files into PDF output from a remote URL, a base64-encoded payload, or a direct file upload. You can receive the result as a downloadable PDF binary or as a signed link, depending on the endpoint you use.

Send a `url` to convert remote HTML, or send `base64` when your HTML is already encoded. For file-based workflows, upload `file` as binary. Several endpoints also accept a `landscape` boolean query parameter, and the download variants let you name the output with `output`.

Use HTML to PDF when you need to generate invoices, reports, receipts, archived snapshots, or printable web pages from existing HTML. The response is intentionally simple: download endpoints return PDF bytes, and link endpoints return a `data` URI pointing to the generated file.

Choose the form of delivery that fits your app: direct binary for immediate file handling, or a signed link when you want to store or share the generated PDF later.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/convert-html-to-pdf
