---
title: Convert HTML Content to PDF API
slug: convert-html-content-to-pdf
url: https://apyhub.com/apyhub/service/convert-html-content-to-pdf
provider: ApyHub
categories: [File Conversion, Smart Generation]
tags: [html-to-pdf, pdf-generation, document-conversion, pdf-rendering, html-rendering]
auth: api_key
---

# Convert HTML Content to PDF API

Convert an HTML content string into a PDF download or signed link. Useful for invoices, reports, and other HTML-based documents.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/generate/html-content/pdf-file` | What it does Converts the provided HTML content string into a PDF and returns the generated file as… | 50 |
| POST | `/generate/html-content/pdf-url` | What it does Renders the provided HTML content string into a PDF and returns a signed link to the g… | 50 |

## About

## What it does
HTML to PDF turns an HTML content string into a PDF, either as a direct download or as a signed link. Send the HTML in `content`, and choose whether you want the result returned as a binary file from `/download` or as a URI from `/link`.

Use `landscape` when the page should render horizontally. The download endpoint also accepts an `output` query parameter so you can name the file returned by the service. The link endpoint is useful when you want to hand off the generated PDF through a temporary URL instead of streaming the file immediately.

This is a good fit for generating invoices, reports, tickets, receipts, or any other document you already build in HTML. If your system already renders templates in the browser or server-side, you can reuse that markup and convert it into a PDF without changing your document layout.

HTML to PDF keeps the interface simple: one required body field and a small set of rendering options. That makes it easy to add PDF export to an existing workflow, batch job, or customer-facing download flow.

## 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-content-to-pdf
