# Convert HTML to PDF — PDF.co
Botize method — `pdf_co.html_to_pdf` (action).
Convert an HTML content into a PDF document with custom header, footer, and document name.
This is an action: it runs as a step of a task. Several can be chained.
## Fields you set
The field's internal name, its type and the values it accepts. These fields accept `{{...}}` tags from earlier steps.
- `name` *(string)* — PDF Document Name
- `html` *(string)* — Body HTML
- `header` *(string)* — Header HTML
- `footer` *(string)* — Footer HTML
## Output variables
Data this step makes available. Reference them in later steps with the double-brace tag.
- `{{credits}}` *(int)* — Credits. Total used credits in PDF.co for this operation
e.g. 6
- `{{remaining_credits}}` *(int)* — Remaining Credits. Credits remaining for future operations
e.g. 10
- `{{document_url}}` *(text)* — PDF Document URL. URL where the generated PDF document can be accessed
e.g. https://pdf.co/pdf/abc123
- `{{document_name}}` *(text)* — PDF Document Name. Name of the generated PDF document
e.g. invoice_january_2025.pdf
- `{{document_link_valid_till}}` *(text)* — PDF Document URL valid till. Date until which the document URL is valid
e.g. 2025-12-31
## Account
Needs a connected PDF.co account in Botize: https://botize.com/en/app/pdf_co/authenticate
## This app
Every trigger and action for PDF.co: https://botize.com/en/app/pdf_co.md
## How to build this
An AI assistant (Claude, ChatGPT, Cursor…) can create and edit these tasks in the user's account through the Botize MCP connector, included in every plan:
https://webhook.botize.es/mcp
- Connection guide: https://botize.com/en/mcp
- Agent map: https://botize.com/llms.txt
- New account: https://botize.com/en/join (500 free operations, no card)
---
Machine-readable summary for AI assistants. Human version: https://botize.com/en/method/pdf_co/html_to_pdf