canonical: https://jentic.com/apis/pdfrender.dev/pdfrender

# pdfrender

The pdfrender API renders an HTML and CSS document to a PDF with WeasyPrint, supporting page headers, footers, and page numbers without a headless browser, and is hosted in Germany. Images, fonts, and CSS are inlined as data: URIs, external resources are rejected with a list of the offending URLs, and JavaScript is not run. On a paid plan the pdf_variant field produces PDF/A-2b or PDF/A-3b output, and an account endpoint reports your plan, remaining requests in the current window, and remaining credits.

## For AI agents

Render a self-contained HTML and CSS document to a PDF, optionally as PDF/A, and check the plan, rate-limit budget, and credits left before rendering.

## Scope

Does not fetch web pages by URL, run JavaScript, or merge and edit existing PDFs. Use for rendering self-contained HTML and CSS documents to PDF only.

## Capabilities

- Render an HTML document with inlined CSS, fonts, and images to a downloadable PDF via POST `/v1/render`
- Set the downloaded file's name with the filename field on a render request
- Produce archival PDF/A-2b or PDF/A-3b output by setting pdf_variant on a paid plan
- Check the current tier, rate-limit window, remaining credits, and plan features via GET `/v1/me` without spending budget

## Use cases

### Agent PDF output through Jentic

An agent that writes a report or receipt as HTML finds the pdfrender render operation through Jentic, sends the document in the html field, and returns the PDF to the user. Because pdfrender blocks external resources, the agent inlines images and fonts as data: URIs before sending. Jentic injects the X-API-Key header at call time so the agent never handles the key.

Example prompt: Inline the report's logo as a data: URI, call POST `/v1/render` with the HTML in html and filename 'q3-report.pdf', and return the PDF

### Archival PDF/A documents

Records that must be archived long term, such as statements or contracts, can be rendered as PDF/A by setting pdf_variant to pdf/a-2b or pdf/a-3b on a paid plan. A request that sets pdf_variant without a paid plan is refused with a feature_not_available problem that includes an upgrade_url.

Example prompt: Call POST `/v1/render` with the statement HTML and pdf_variant 'pdf/a-3b', and if the response code is feature_not_available report the upgrade_url

### Budget-aware batch rendering

Before rendering a batch of documents, GET `/v1/me` returns the tier, whether the key was recognised, the rate_limit block with remaining requests, and credits left in the billing period. The call is not metered, so an agent can check its budget first and pace a batch instead of failing partway through on rate_limited or credits_exhausted errors.

Example prompt: Call GET `/v1/me`, read rate_limit.remaining and credits.balance, then render only as many invoices with POST `/v1/render` as the budget allows

## Key resources

- **Render** — Render an HTML document to a PDF, optionally as PDF/A
- **Account** — Read the plan, rate-limit window, credits, and features for the calling key

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 71 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 62 / 100
  - Agent Usability: 94 / 100
  - Security: 50 / 100
  - AI Discoverability: 88 / 100
- **View full report:** https://jentic.com/apis/pdfrender.dev/pdfrender/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring pdfrender by hand means adding the X-API-Key header, reading its rate-limit headers, and branching on problem codes such as rate_limited or credits_exhausted yourself. Through Jentic you install once, import pdfrender from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Limit the agent to the operations it needs, such as reading the account budget or rendering. pdfrender carries the document in the request body, so rules bound which operations your agent may call, not which document it renders.
- **Credential handling:** Your pdfrender API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'render HTML to PDF' or 'check my PDF credits', and Jentic returns the matching pdfrender operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **PDFBolt API** — HTML, URL, and template PDF generation with sync and webhook modes
- **Html2PDF API** — Converts HTML or a URL to PDF
- **BoldSign API** — Sends documents for e-signature and tracks signing status

## FAQ

### What authentication does the pdfrender API use?

Per its OpenAPI spec, the pdfrender API takes an API key in the `X-API-Key` header. The spec also notes that calls without a key run anonymously at a lower rate limit per IP address. Through Jentic the key is stored encrypted by your own Jentic One instance and injected at call time, so it never enters the agent's context.

### Can pdfrender load external images or stylesheets?

No. Images, fonts, and CSS must be inlined as data: URIs. A document that references an external http, https, or file resource is rejected with an external_resource_blocked error whose detail lists the URLs, relative URLs are ignored, and JavaScript is not run.

### How do I render a PDF with pdfrender through Jentic?

Search Jentic for 'render HTML to PDF', load the schema for POST `/v1/render`, and send your document in the required html field with an optional filename. The response is the PDF as a download. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### What are the rate limits for the pdfrender API?

Per the OpenAPI spec, every response carries X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers, and over-budget calls return 429 with a Retry-After header. Without a key, rendering works for 10 requests a day per IP address. GET `/v1/me` reports your live budget and does not count against it.

### Is there a pdfrender MCP server?

You don't need an MCP server to give your agent the pdfrender API. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls it. Operations are discovered on demand, so no extra tool definitions sit in the agent's context.

### Can I limit what my agent is allowed to do with the pdfrender API?

Yes. For example, write a rule that allows only GET `/v1/me`, so a monitoring agent can read the plan and remaining credits without spending any on renders. Add POST `/v1/render` when the agent should produce PDFs, and every call it makes is logged by your Jentic One instance.
