# Platemark: charts, images and PDFs from JSON (`rowhouse/platemark`) Actor

Send JSON, get a finished file: a chart PNG, a social image, or an invoice, quote, receipt, certificate or letter PDF. Each file gets a link.

- **URL**: https://apify.com/rowhouse/platemark.md
- **Developed by:** [Rowhouse Software](https://apify.com/rowhouse) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 charts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Charts, images and PDFs from JSON

Send JSON. Get back a finished chart, social image or PDF, with a link to the file.

### Try it

Input:

```json
{
  "type": "chart",
  "data": {
    "type": "bar",
    "title": "Monthly revenue",
    "subtitle": "Example data, USD",
    "labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"],
    "values": [4200, 5100, 4800, 6400, 7100, 8300],
    "format": "currency",
    "highlight": "Jun"
  }
}
```

Output, one row per file:

```json
{
  "status": "ok",
  "type": "chart",
  "fileName": "chart-1.png",
  "url": "https://api.apify.com/v2/key-value-stores/YOUR_STORE/records/chart-1.png",
  "bytes": 38095,
  "ms": 59,
  "altText": "Bar chart: Monthly revenue. Highest: Jun at $8,300. Lowest: Jan at $4,200."
}
```

That input is already filled in. Hit Start to make this chart.

### Price

| File | Price |
|-|-|
| Chart | $0.005 |
| Image | $0.005 |
| PDF | $0.01 |

You pay for each finished file. If a render fails, you don't pay for it.

<sub>Apify adds its usual start fee of $0.00005 per run.</sub>

### What it makes

**Charts.** Bar, horizontal bar, stacked bar, line, area, pie, donut. PNG or SVG. You send the numbers and it works out the axes and labels.

**Images.** 12 templates: link previews, social posts, quote cards, listings, sale banners. You send the text and photo links. Text shrinks to fit its box.

**PDFs.** Invoices, quotes, receipts, certificates, letters. It does the invoice math and sends the totals back, so the numbers you report match the page.

Everything renders inside your own run. Your data isn't sent to another service.

### Good for agents

Each file is one row with a link, so an agent can read the result and pass it on. A bad request comes back as a row that says what to fix. Charts come with a sentence of alt text.

### What it doesn't do

No video, no custom fonts and no templates of your own. Links last as long as Apify keeps your run's storage, so download anything you want to keep.

<details>
<summary>Chart data</summary>

```json
{
  "type": "line",
  "title": "Weekly signups",
  "labels": ["Wk 1", "Wk 2", "Wk 3"],
  "series": [
    { "name": "Organic", "values": [120, 135, 150] },
    { "name": "Paid", "values": [80, 95, 70] }
  ]
}
```

- `type`: bar, horizontal_bar, stacked_bar, line, area, pie or donut.
- `values` for one series, or `series` for up to 8. Up to 200 values each.
- `labels`: one per value.
- `format`: number, currency or percent. Add `currency` (like EUR), `locale` (like de-DE) and `decimals`.
- `title`, `subtitle` and `source` for the text around the chart.
- `highlight`: a label to call out. The rest go gray.
- `theme`: light or dark. `colors`: hex colors, one per series.
- `show_values`, `y_min`, `y_max`.
- Pick a shape in the Size field. Or put `width` and `height` (300 to 2400) in the data.

Pie and donut charts keep 6 slices and fold the rest into Other. A `null` value leaves a gap in a line.

</details>

<details>
<summary>Image templates</summary>

```json
{ "type": "image", "data": { "template": "og-image", "title": "How we closed the books in two days", "site": "example.com/blog" } }
```

| Template | Size | Slots |
|-|-|-|
| `og-image` | 1200x630 | site, title, subtitle |
| `og-image-photo` | 1200x630 | photo, site, title, subtitle |
| `social-post-square` | 1080x1080 | photo, kicker, headline |
| `social-post-portrait` | 1080x1350 | photo, kicker, headline, footer |
| `quote-card-square` | 1080x1080 | quote, author, role |
| `quote-card-story` | 1080x1920 | quote, author, role |
| `announcement-story` | 1080x1920 | photo, kicker, headline, footer |
| `just-listed-square` | 1080x1080 | photo, status, price, address, details |
| `just-listed-story` | 1080x1920 | photo, status, price, address, details, agent |
| `product-card-square` | 1080x1080 | photo, badge, name, detail, price |
| `sale-banner-square` | 1080x1080 | kicker, offer, detail, code |
| `video-thumbnail` | 1280x720 | photo, headline, tag |

A slot you leave out keeps its sample text or photo. A photo slot takes an https link to a PNG, JPG or GIF under 4 MB. To change a color, send an object: `"title": { "text": "Hello", "color": "#1d4ed8" }`.

</details>

<details>
<summary>Document data</summary>

```json
{
  "type": "document",
  "data": {
    "document": "invoice",
    "number": "INV-1042",
    "from": { "name": "Harbor Design Co.", "email": "billing@harbor.example" },
    "to": { "name": "Ledgerline, Inc." },
    "items": [
      { "description": "Website design", "quantity": 24, "unit_price": 65 },
      { "description": "Hosting, 12 months", "unit_price": 120 }
    ],
    "tax": { "percent": 6 },
    "due_days": 30
  }
}
```

The row comes back with `"totals": { "subtotal": 1680, "tax": 100.8, "total": 1780.8, "amount_due": 1780.8 }`.

- `invoice`, `quote`, `receipt`: from, to, items. Optional: number, issue_date, due_date, due_days, currency, locale, discount, tax, shipping, amount_paid, payment_instructions, notes, terms, po_number, accent. Quotes add valid_until or valid_days. Receipts add paid_date and payment_method.
- `certificate`: title, recipient, reason, kicker, presented, signatures (up to 2, each with name and role), date, id.
- `letter`: from, to, subject, body (blank lines split paragraphs), signer, signer_role, date and closing.

Use the Size field for letter or a4.

</details>

<details>
<summary>Many files in one run</summary>

Put up to 200 renders in `renders`. Each one takes the same fields as a single render.

```json
{
  "renders": [
    { "type": "chart", "data": { "type": "pie", "labels": ["A", "B"], "values": [3, 1] } },
    { "type": "document", "fileName": "invoice-1042", "data": { "document": "receipt", "from": { "name": "Harbor Design Co." }, "to": { "name": "Ledgerline, Inc." }, "items": [{ "description": "Deposit", "unit_price": 500 }] } }
  ]
}
```

If you set a spending limit on the run, it stops when the limit is reached and marks the rest as skipped.

</details>

Made by Rowhouse Software. Platemark also runs as a hosted API and MCP server at [platemark.rowhousesoftware.com](https://platemark.rowhousesoftware.com).

# Actor input Schema

## `type` (type: `string`):

chart: a chart image from numbers. image: a social or link preview image from a template. document: an invoice, quote, receipt, certificate or letter PDF.

## `data` (type: `object`):

The content, as JSON.

Chart: {"type": "bar", "title": "...", "labels": \[...], "values": \[...]}. Chart types: bar, horizontal_bar, stacked_bar, line, area, pie, donut. Use "series": \[{"name", "values"}] for several lines or bars. Optional: subtitle, source, highlight, theme (light or dark), colors, show_values, and format (number, currency or percent) with currency, locale and decimals.

Image: {"template": "og-image", "title": "...", "subtitle": "..."}. Templates: og-image, og-image-photo, social-post-square, social-post-portrait, quote-card-square, quote-card-story, announcement-story, just-listed-square, just-listed-story, product-card-square, sale-banner-square, video-thumbnail. A slot you leave out keeps its sample text. Photo slots take an https link to a PNG, JPG or GIF under 4 MB. An unknown slot name returns the list of slots.

Document: {"document": "invoice", "from": {"name"}, "to": {"name"}, "items": \[{"description", "quantity", "unit_price"}], "tax": {"percent"}}. Documents: invoice, quote, receipt, certificate (title, recipient, reason, signatures), letter (from, to, subject, body). The sums are done for you and come back in the totals field.

## `format` (type: `string`):

Charts and images come out as png or svg. Documents are always pdf. Auto picks png or pdf.

## `size` (type: `string`):

Charts: landscape 1200x675, og 1200x630, square 1080x1080, portrait 1080x1350 or story 1080x1920. Documents: letter or a4. Images take their size from the template, so leave this on auto.

## `fileName` (type: `string`):

Optional name for the file, like june-revenue. Left empty, files are named chart-1.png, document-2.pdf and so on.

## `renders` (type: `array`):

Optional. A list of more files to make in the same run, up to 200 in total. Each item is an object with the same fields as above: {"type", "data", "format", "size", "fileName"}.

## Actor input object example

```json
{
  "type": "chart",
  "data": {
    "type": "bar",
    "title": "Monthly revenue",
    "subtitle": "Example data, USD",
    "labels": [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun"
    ],
    "values": [
      4200,
      5100,
      4800,
      6400,
      7100,
      8300
    ],
    "format": "currency",
    "highlight": "Jun"
  },
  "format": "auto",
  "size": "auto"
}
```

# Actor output Schema

## `renders` (type: `string`):

One row per render: status, type, url, bytes, ms, and the error message if it failed.

## `files` (type: `string`):

The rendered PNG, SVG and PDF files.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "data": {
        "type": "bar",
        "title": "Monthly revenue",
        "subtitle": "Example data, USD",
        "labels": [
            "Jan",
            "Feb",
            "Mar",
            "Apr",
            "May",
            "Jun"
        ],
        "values": [
            4200,
            5100,
            4800,
            6400,
            7100,
            8300
        ],
        "format": "currency",
        "highlight": "Jun"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rowhouse/platemark").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "data": {
        "type": "bar",
        "title": "Monthly revenue",
        "subtitle": "Example data, USD",
        "labels": [
            "Jan",
            "Feb",
            "Mar",
            "Apr",
            "May",
            "Jun",
        ],
        "values": [
            4200,
            5100,
            4800,
            6400,
            7100,
            8300,
        ],
        "format": "currency",
        "highlight": "Jun",
    } }

# Run the Actor and wait for it to finish
run = client.actor("rowhouse/platemark").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "data": {
    "type": "bar",
    "title": "Monthly revenue",
    "subtitle": "Example data, USD",
    "labels": [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun"
    ],
    "values": [
      4200,
      5100,
      4800,
      6400,
      7100,
      8300
    ],
    "format": "currency",
    "highlight": "Jun"
  }
}' |
apify call rowhouse/platemark --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rowhouse/platemark"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/VJ5WcBGtcBw7KapF4/builds/A9mM68gSI8q9uhDMe/openapi.json
