---
canonical: 'https://htmlcsstoimage.com/features/html-to-pdf-for-developers'
title: 'HTML to PDF API for Developers | HTML/CSS to Image'
description: 'Add HTML to PDF generation without running Chromium. Render JavaScript, web fonts, and charts with explicit page size, margin, scale, and print controls.'
---

# Add PDF exports without running Chromium

Build reports, invoices, and downloads with the HTML and CSS you already use. The API manages the browser, rendering, file storage, and delivery.

## Key capabilities

- HTML, CSS, and JavaScript
- Page and print controls
- Hosted browser rendering

## How the HTML to PDF API works

Send HTML and CSS to `POST https://hcti.io/v1/image` with `pdf_options`. HTML/CSS to Image (HCTI) renders it in Chromium, so JavaScript, web fonts, charts, and browser-supported layouts work in the generated PDF without a separate document renderer.

## Control the PDF layout

Set the PDF page width, height, scale, print backgrounds, and each margin in the same API request.

```json
{
  "pdf_options": {
    "page_width": "8.5in",
    "page_height": "11in",
    "margins": ["0.4in", "0.4in", "0.4in", "0.4in"],
    "print_background": true
  }
}
```

PDF output is available on supported plans. Check [pricing](https://htmlcsstoimage.com/pricing.md) for current availability.

## MCP Integration

Connect an MCP-compatible client to `https://mcp.hcti.io` with OAuth. The tools use the connected organization's HTML/CSS to Image account, permissions, and plan limits.

- The `create_image` tool accepts HTML and CSS with `pdf_options` and returns the generated PDF URL. Use it to create reports, invoices, certificates, and other documents.

[Read the full MCP docs](https://docs.htmlcsstoimage.com/integrations/mcp/).

## Add PDF generation to your application

### Application exports

Convert views and report data into downloadable PDFs without maintaining a second rendering system.

### Background document jobs

Generate personalized files from queues, scheduled tasks, and data-processing jobs.

### Shared web components

Reuse HTML, CSS, web fonts, and charting code across browser views and generated PDFs.

### Permanent records

Create PDF records for completed actions, approvals, transactions, and other important events.

## Get started

REST API requests require an HTML/CSS to Image account and should be authenticated from trusted application code. Check the API docs and pricing for current setup instructions, limits, and feature availability.

- [View the full feature page](https://htmlcsstoimage.com/features/html-to-pdf-for-developers)
- [Browse all features](https://htmlcsstoimage.com/features.md)
- [Start free](https://htmlcsstoimage.com/join)
- [View pricing](https://htmlcsstoimage.com/pricing.md)
- [Read the PDF docs](https://docs.htmlcsstoimage.com/parameters/pdf_options/)
- [Read the MCP docs](https://docs.htmlcsstoimage.com/integrations/mcp/)
