# Print API – HTML-to-PDF Document Renderer

> Print API – HTML-to-PDF Document Renderer is a paid API for AI agents from print-api-production-a047.up.railway.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-11).

Converts structured content blocks (headings, paragraphs, bullet lists, tables) into a paginated, styled A4 or Letter PDF document with page numbers and custom accent color.

## Facts

- Endpoint: POST https://print-api-production-a047.up.railway.app/v1/documents/render?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/print-api-html-to-pdf-document-renderer-d81df09a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yhaSgwVl0kD7bzNxl2-eB

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability print-api-html-to-pdf-document-renderer-d81df09a -d '<json body>'
```

Example prompt: Can you generate a styled A4 PDF titled 'Q2 Sales Report' by Jane Smith, with a teal accent color (#237b65), including a heading for 'Revenue Overview', a paragraph summarizing the quarter, a bullet list of top products, and a table of monthly figures — with a footer that says 'Confidential'?

## When to prefer this

Choose this endpoint when you need to programmatically generate a clean, paginated PDF document from structured textual content (headings, paragraphs, lists, tables) without needing arbitrary HTML/CSS rendering, remote image assets, or JavaScript execution. It is ideal for reports, proposals, agendas, and data summaries where the output must be print-ready A4 or Letter format with consistent styling. Prefer alternatives if you need to render arbitrary HTML, embed images or charts, or produce non-PDF formats like DOCX or HTML.

## Known failure modes

- Missing required 'title' or 'blocks' fields returns a 422 validation error
- Blocks array exceeds 60 items returns a validation error
- Table rows exceed 200 or table has more than 12 columns returns a validation error
- Bullet list exceeds 30 items returns a validation error
- Invalid hex color format for 'accent' returns a validation error
- Payment not included or insufficient returns a 402 Payment Required error
- Title exceeds 200 characters or paragraph text exceeds 4000 characters returns a validation error

## How this service works

Turn headings, paragraphs, lists and tables into a paginated, styled A4 or Letter PDF with page numbers. No remote assets or arbitrary scripts.

## Output

Returns a binary PDF file representing the fully paginated, styled document. The PDF includes a title page area with title, subtitle, and author; body content rendered from the provided blocks (headings, paragraphs, bullet lists, tables); automatic page numbering; and the specified accent color applied to headings and structural elements.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "paper": {
   "enum": [
    "A4",
    "Letter"
   ],
   "type": "string",
   "default": "A4"
  },
  "title": {
   "type": "string",
   "maxLength": 200,
   "minLength": 1
  },
  "accent": {
   "type": "string",
   "default": "#237b65",
   "pattern": "^#[0-9a-fA-F]{6}$"
  },
  "author": {
   "type": "string",
   "default": "",
   "maxLength": 100
  },
  "blocks": {
   "type": "array",
   "items": {
    "oneOf": [
     {
      "type": "object",
      "required": [
       "type",
       "text"
      ],
      "properties": {
       "text": {
        "type": "string",
        "maxLength": 300,
        "minLength": 1
       },
       "type": {
        "type": "string",
        "const": "heading"
       },
       "level": {
        "enum": [
         "h2",
         "h3"
        ],
        "type": "string",
        "default": "h2"
       }
      },
      "additionalProperties": false
     },
     {
      "type": "object",
      "required": [
       "type",
       "text"
      ],
      "properties": {
       "text": {
        "type": "string",
        "maxLength": 4000,
        "minLength": 1
       },
       "type": {
        "type": "string",
        "const": "paragraph"
       }
      },
      "additionalProperties": false
     },
     {
      "type": "object",
      "required": [
       "type",
       "items"
      ],
      "properties": {
       "type": {
        "type": "string",
        "const": "bullets"
       },
       "items": {
        "type": "array",
        "items": {
         "type": "string",
         "maxLength": 1000,
         "minLength": 1
        },
        "maxItems": 30,
        "minItems": 1
       }
      },
      "additionalProperties": false
     },
     {
      "type": "object",
      "required": [
       "type",
       "headers",
       "rows"
      ],
      "properties": {
       "rows": {
        "type": "array",
        "items": {
         "type": "array",
         "items": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 500
           },
           {
            "type": "number"
           },
           {
            "type": "boolean"
           },
           {
            "type": "null"
           }
          ]
         },
         "maxItems": 12
        },
        "maxItems": 200
       },
       "type": {
        "type": "string",
        "const": "table"
       },
       "headers": {
        "type": "array",
        "items": {
         "type": "s
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/print-api-html-to-pdf-document-renderer-d81df09a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from print-api-production-a047.up.railway.app](https://www.zero.xyz/host/print-api-production-a047.up.railway.app/llms.txt)
