25 lines
1.1 KiB
Markdown
25 lines
1.1 KiB
Markdown
# Show HN: DocFast – HTML/Markdown to PDF API with built-in templates
|
||
|
||
I built a simple API for generating PDFs from HTML or Markdown. It's at https://docfast.dev
|
||
|
||
**Why I built it:** Every time I needed to generate invoices, reports, or receipts in a side project, I'd end up wrestling with wkhtmltopdf configs or spinning up a headless browser. I wanted a single API call that just works.
|
||
|
||
**What it does:**
|
||
- Send HTML or Markdown, get a PDF back
|
||
- Built-in templates for common docs (invoices, receipts, reports)
|
||
- Supports custom CSS, headers/footers, page sizes
|
||
- Fast — most PDFs generate in under 2 seconds
|
||
|
||
**Quick example:**
|
||
|
||
```bash
|
||
curl -X POST https://docfast.dev/v1/convert/html \
|
||
-H "Authorization: Bearer YOUR_API_KEY" \
|
||
-H "Content-Type: application/json" \
|
||
-d '{"html": "<h1>Hello World</h1><p>Generated with DocFast.</p>"}' \
|
||
--output hello.pdf
|
||
```
|
||
|
||
**Pricing:** Free tier gives you 100 PDFs/month (no credit card). Pro is $9/mo for 10,000 PDFs.
|
||
|
||
Built it solo. Would appreciate any feedback on the API design or docs (https://docfast.dev/docs).
|