# PDF Generator from JSON

PDF generator and invoice generator: send JSON, get a typeset PDF with totals calculated. No HTML, no headless browser.

Send the data and get a typeset PDF back. Invoice totals are calculated exactly. Text is treated as text, never as markup, so customer data cannot change the document. Latin, Greek and Cyrillic script. This is a layout tool: it does not produce a legally compliant e-invoice.

- Send data, not HTML: no template engine, no browser, the same input always gives the same PDF.
- Text is treated as text, never as markup, so customer data cannot change the document.
- Invoice line totals, tax and the grand total are calculated exactly for you.

## Calls

### `POST https://readymadeapi.com/v1/pdf/invoice`

Render an invoice or receipt. Line totals, tax and the grand total are worked out for you.

- Price: $0.003 per document
- MCP tool: `pdf_forge_invoice`
- Answers in the same call.

Request:

```json
{
  "buyer": {
    "address": "Musterstr. 2\nBerlin",
    "name": "Client GmbH"
  },
  "currency": "EUR",
  "date": "2026-11-09",
  "items": [
    {
      "description": "Consulting, October",
      "quantity": "3",
      "unit_price": "120.00"
    },
    {
      "description": "Workshop day on site",
      "quantity": "1",
      "unit_price": "950.00"
    },
    {
      "description": "Travel",
      "quantity": "1",
      "unit_price": "84.50"
    }
  ],
  "notes": "Payment within 30 days to IBAN RO49 AAAA 1B31 0075 9384 0000.",
  "number": "2026-041",
  "seller": {
    "address": "Str. Exemplu 1\nBucharest",
    "name": "Acme SRL",
    "tax_id": "RO123456"
  },
  "tax_percent": "19"
}
```

The answer is the file itself (`application/pdf`).

### `POST https://readymadeapi.com/v1/pdf/report`

Render a titled document with sections, paragraphs and tables.

- Price: $0.003 per document
- MCP tool: `pdf_forge_report`
- Answers in the same call.

Request:

```json
{
  "sections": [
    {
      "heading": "Summary",
      "paragraphs": ["Revenue grew in every region."],
      "table": {
        "columns": ["Region", "Revenue"],
        "rows": [
          ["EU", "120"],
          ["US", "80"]
        ]
      }
    }
  ],
  "subtitle": "Q3 2026",
  "title": "Quarterly review"
}
```

The answer is the file itself (`application/pdf`).

## Limits

- A4 or US Letter.
- Up to 500 line items per invoice; a report up to 500 sections and 5,000 paragraphs and table cells; each text field up to 5,000 bytes.

## Questions

**Can I send my own HTML or CSS?**

No, and that is the point: two layouts (invoice or receipt, and a report with sections, paragraphs and tables) that always come out right.

**Is the invoice a legal e-invoice?**

No. It is a well-typeset PDF, not a compliant e-invoice format.

**Which page sizes?**

A4 or US Letter.

**Which scripts?**

Latin, Greek and Cyrillic.

## Using it

- Send `Authorization: Bearer <key>` and a JSON body. Keys and credit: https://readymadeapi.com/account
- Every answer carries `X-Request-Id`, `X-Units` and `X-Charged-Usd`.
- An error is a JSON problem with a `title` to act on and a `detail` in plain words; nothing is charged for it.
- Full schema: https://readymadeapi.com/openapi.json
