PDF Generator: Markdown & HTML to PDF and Word (DOCX)
Pricing
$5.00 / 1,000 document generateds
PDF Generator: Markdown & HTML to PDF and Word (DOCX)
Turn Markdown or HTML into downloadable PDF, Word (DOCX) or HTML files with report, invoice and letter styles, page numbers, headers and A4/Letter sizes. Built for AI agents that write documents.
Pricing
$5.00 / 1,000 document generateds
Rating
0.0
(0)
Developer
Tudor Lane
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
11 days ago
Last modified
Categories
Security
Limited permissionsShare
Use when…
- You need Markdown or HTML turned into a PDF or Word (DOCX) file.
- An agent must generate a report, invoice layout or printable doc from structured text.
- You want a downloadable document artifact from a simple text input.
Try this input
Copy-paste this JSON as the Actor input (it matches a successful run / the default schema):
{"requests": [{"markdown": "# Quarterly Report\n\nRevenue grew **12%**.\n\n| Region | Sales |\n|---|---|\n| UK | £1.2m |\n| US | $2.4m |\n\n- Point one\n- Point two","template": "report","title": "Q3 Report","formats": ["pdf","docx"]},{"html": "<h1>Invoice #1001</h1><p>Bill to: Acme Ltd</p><table><tr><th>Item</th><th>Amount</th></tr><tr><td>Consulting</td><td>£500.00</td></tr></table>","template": "invoice","formats": ["pdf"]}]}
Sample output (real run 2026-10-25)
One dataset item, shortened:
{"title": "Invoice #1001","template": "invoice","files": {"pdf": {"url": "https://api.apify.com/v2/key-value-stores/UA3Tbg9Kc06M8Zcwi/records/Invoice-1001-21b7988d.pdf?signature=15yKTRr1LpTWxKrOmQUO7","key": "Invoice-1001-21b7988d.pdf","bytes": 8540,"pages": 1}},"pdf_url": "https://api.apify.com/v2/key-value-stores/UA3Tbg9Kc06M8Zcwi/records/Invoice-1001-21b7988d.pdf?signature=15yKTRr1LpTWxKrOmQUO7","docx_url": null,"pages": 1,"ms": 1332,"error": null}
Agents can write documents but can't hand over a file. This turns their Markdown or HTML into a real PDF or Word document with a download link.
- Markdown (tables, code blocks, lists) or raw HTML in, PDF / DOCX / HTML out, in one call
- Templates: plain, report, invoice, letter; add your own
css - Page numbers (Page X of Y), header text, A4 / Letter / Legal / A5, title and author metadata
- Remote images over public https are embedded; local files and private addresses are blocked
- No browser needed (WeasyPrint), so it's fast and cheap; files are kept in the run's key-value store
Input
{"requests": [{"markdown": "# Proposal\n\nPrepared for **Acme**.\n\n| Item | Price |\n|---|---|\n| Setup | £900 |", "template": "report", "formats": ["pdf", "docx"], "header": "Confidential"}]}
Send many items in requests per run (cheaper and faster than one run each). Settings outside requests apply to every item.
Pricing
Pay per event: $0.005 per document generated (one document generated (all requested formats)). Rows with errors are not charged. No subscription.
Output
One dataset row per request. Errors come back as a row with error set, so a batch never fails because of one bad item.
Use from AI agents (MCP)
Add it to any MCP client via https://mcp.apify.com?actors=tudorlane/html-markdown-to-pdf, or call the Apify API / run-sync endpoint.
Sources and licences
WeasyPrint (BSD), Python-Markdown (BSD), python-docx (MIT), htmldocx (MIT), DejaVu and Liberation fonts. No external data.
Search terms: PDF generator, HTML to PDF, markdown to PDF, PDF API, DOCX generator, invoice PDF, report PDF
Sample output (real run with the default input, 25 Oct 2026)
| Title | Template | Files made | Pages | Time |
|---|---|---|---|---|
| Invoice #1001 | invoice | 1 | 0.8 s | |
| Q3 Report | report | PDF + Word (DOCX) | 1 | 1.4 s |
Use cases
- Generate invoices or reports from HTML
- Turn AI-written markdown into PDF or Word
- Agents: make a shareable document in one call
- Batch document export
Limits & failure modes
- Complex CSS/JavaScript layouts may render differently from a browser
- Output files stored in the run's key-value store
- Complex CSS/JS layouts may not render exactly like a browser print.
- Very large inputs can hit memory/time limits; split documents if needed.
- Failed conversions return an error and are not charged.