ForHosting KIT · Documents & PDF

Turn an HTML report into a PDF

The PDF Report API takes an HTML document — a dashboard export, a data summary, a formatted analysis — and paginates it into a proper PDF with headers, page breaks, and consistent margins. It's for the reports your systems already know how to render as a webpage but need to hand someone as a file.

● 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.

A webpage and a report are not the same artifact

Plenty of internal tools already render a perfectly good HTML view of a report — a monthly summary, a dashboard snapshot, an analytics breakdown — but a webpage isn't something you attach to an email, archive for compliance, or hand to a client who wants a document, not a link that might change tomorrow. The generate pdf report api exists to convert what you already render as HTML into something that behaves like a finished report: fixed, paginated, and portable.

What happens to your HTML

You send the HTML content — either inline markup or a reference the service can retrieve — and it's rendered and paginated into a PDF that respects your styling while adding what a printed report actually needs: sensible page breaks that don't cut a table in half if avoidable, consistent margins, and repeating headers or footers so a reader can tell which page belongs to which section without scrolling back to page one.

How the conversion and delivery work

Call POST /pdf/report with your HTML and you get a task_id back immediately, no open connection required while pagination runs. The PDF is built asynchronously on our global edge, and once it's finished you're notified by a signed webhook — well suited to a reporting pipeline that emails or archives the file automatically — or by a signed link valid for 24 hours when someone just needs to open one report.

Where this fits in a reporting pipeline

This is meant to sit at the end of whatever already produces your HTML: a business-intelligence tool exporting a weekly dashboard snapshot, an internal system compiling a client-facing performance summary, an analytics job rendering a monthly breakdown that needs to be archived as a fixed record. Because it takes HTML as input, you keep using whatever templating or charting you already have — the endpoint's job is turning that rendered page into a document with real pagination, not re-authoring your report.

Pricing and how report data is handled

Billing is $0.040 per request plus $0.001 per page, a published rate with no tokens and no invented credits — a longer report costs more precisely because it has more pages, nothing hidden in between. A failed conversion is never charged; we retry three times before returning a clear error. Access requires prepaid balance, with no free tier or trial, which keeps the endpoint fast and abuse-free; requests without balance get a 402. Report content is deleted after the retention window and never used for training.

Weekly dashboard snapshots

A BI tool exports its live dashboard as HTML and converts it to a paginated PDF every week so stakeholders get a fixed, archivable record.

Client-facing performance summaries

An agency renders a monthly performance report as HTML internally and converts it to a branded PDF to send to each client.

Compliance and audit archives

An internal system converts a rendered analytics report to PDF each period so there's a fixed, unchangeable document on file for audit purposes.

Automated end-of-run summaries

A data pipeline renders an HTML summary when a job finishes and converts it to a PDF that gets attached to the completion notification.

How do I generate a PDF report with an API?

Send your HTML report to POST /pdf/report and you get a task_id back. The generate pdf report api paginates and renders the document asynchronously, delivering it by signed webhook or a signed link valid for 24 hours.

Is this 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 handle page breaks properly, or does content get cut off?

The service paginates content with sensible page breaks and consistent margins, avoiding awkward cuts through tables or blocks wherever the layout allows.

Can I include headers, footers, or page numbers?

Yes. Repeating headers and footers are supported so each page identifies its section, which is what makes a long report navigable instead of a wall of pages.

How is a long report priced?

You pay $0.040 per request plus $0.001 per page, so cost scales directly with the number of pages your report actually produces.

Can I convert reports in bulk on a schedule?

Yes. The endpoint is asynchronous and each call returns its own task_id, which fits a scheduled job that renders and converts a batch of reports on a recurring cadence.

What happens if the conversion fails?

A failed task is never charged. We retry three times and return a clear error rather than a silent failure or an unexpected charge.

How long can I access the generated report?

The signed link stays valid for 24 hours, or you can receive the PDF immediately by signed webhook. After the retention window it's deleted and never 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/report

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/report \
  -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.report",
  "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 →