ForHosting KIT · Documents & PDF

Convert Markdown to PDF

Feed it plain Markdown and get back a properly typeset PDF — headings, lists, tables, code blocks and blockquotes rendered with real pagination, not a browser print dialog screenshot. It exists for the moment your content lives in Markdown but someone downstream needs a document.

● StablePer request + per page$0.040
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

Why Markdown still needs a PDF exit

Markdown won because it's fast to write and diffs cleanly in git, but almost nobody outside engineering wants to read it raw. Release notes, README exports, internal wikis, AI-generated reports, knowledge-base articles — all of it eventually needs to land in someone's inbox or a compliance folder as a document with margins, page numbers and a stable layout. This endpoint is that exit ramp: the same Markdown your team already writes becomes a PDF your finance department, a client or an auditor can open without asking what a .md file is.

What actually happens to your file

The service parses the Markdown into a structured document tree, then lays it out with typographic rules a browser's print function ignores: sane line-height, widow and orphan control, page breaks that respect headings, and tables that don't get sliced in half at a page edge. Fenced code blocks keep monospace formatting and don't overflow the margin; nested lists keep their indentation. The result is a single, self-contained PDF, not a folder of assets.

What to send and what comes back

POST the Markdown source (or a link to it) to /pdf/from-markdown. Because rendering and pagination take real compute time on longer documents, the call is asynchronous: you get a task_id immediately, and the finished PDF arrives at your signed webhook, or you poll a signed link that stays valid for 24 hours. Nothing sits waiting on an open HTTP connection.

Where it fits in a pipeline

Because it's one REST call, it drops into whatever generates the Markdown in the first place: a CI job that renders release notes on every tag, a CMS that exports articles as branded PDFs, or an internal tool that turns a support ticket's Markdown log into an attachable record. You never touch a rendering library, a font file or a headless browser yourself.

Billing that matches the work

Pricing is a small base fee per request plus a per-page charge, published and predictable, so a one-page changelog and a forty-page manual cost proportionally different amounts — never a flat guess. A task that fails after three retries is never billed, and results are deleted after the retention window and never used to train anything.

Automated release notes

A CI pipeline writes Markdown changelogs on every deploy; this endpoint turns each one into a PDF attached to the release email automatically.

Client-ready reports from AI output

An internal tool generates analysis in Markdown; converting it to PDF makes it something you can actually send to a client without reformatting.

Documentation archiving

A wiki or README needs a point-in-time, immutable snapshot for compliance — export the Markdown source straight to PDF and file it.

Support ticket records

A ticketing system logs conversations as Markdown; converting the thread to PDF gives you a clean attachment for a case file.

Is the Markdown to PDF API free?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

Does it support GitHub-flavored Markdown?

Yes, including tables, fenced code blocks, task lists and blockquotes; all render as proper PDF elements, not plain text dumps.

Can I control the styling?

The renderer applies a clean, readable default typographic style suited for documents, tables and code, so you don't need to hand-tune CSS to get something presentable.

How do I get the finished file?

Via a signed webhook call when the task completes, which is recommended for automation, or a signed link valid for 24 hours if you'd rather poll.

What happens if the conversion fails?

The task retries automatically up to three times; if it still fails you get a clear error and are never charged for it.

Can I convert many Markdown files at once?

Yes — submit one task per file. Each call is priced and billed independently, so bulk conversion scales linearly and predictably.

Does it embed images referenced in the Markdown?

Yes, image references are resolved and embedded into the PDF layout at their position in the document.

Is my content kept after conversion?

No. Source and output are deleted after the retention window, and nothing you send is ever used for training.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/pdf/from-markdown

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/pdf/from-markdown \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pdf":"https://ejemplo.com/documento.pdf"}'
{
  "pdf": "https://ejemplo.com/documento.pdf"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "pdf.from_markdown",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.040
Per page$0.001

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb25
max_pages200
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
413input_too_largeThe file exceeds the size limit.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →