PDF page box check: trim, bleed and safe area from supplied boxes
Checks the five PDF page boxes you supply (MediaBox, CropBox, BleedBox, TrimBox, ArtBox, in points) for a print job: applies the ISO 32000-1 defaults and media-box clipping, measures bleed on each side of the trim box, and tests the content box against a safe margin inside the trim, for agents that prepare or accept print-ready PDFs. It does not read a PDF file, check fonts, colour, image resolution or marks, or know a printer's own requirements; you supply the minimum bleed and safe margin. A missing TrimBox gives `unknown` for bleed and safe-area questions because the finished size is then not declared.
What you get
Bleed shortfalls and content inside the trim margin are what printers reject files for; the exact side and shortfall comes back in one call.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/print-box. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/print-box \
-H 'content-type: application/json' \
-d '{"pageBoxes":{"mediaBox":[0,0,612,792],"trimBox":[9,9,603,783],"bleedBox":[0,0,612,792],"artBox":[36,36,576,756]},"requirements":{"unit":"mm","minBleed":3,"safeMargin":5}}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
pageBoxes | object | yes | mediaBox is required; the others are optional and default per ISO 32000-1 (cropBox to mediaBox; bleedBox, trimBox, artBox to cropBox). |
userUnit | number; 0.0001..1000 | no | The page's UserUnit (default 1): the size of one user space unit in 1/72 inch. |
requirements | object | no | |
contentBox | array<number; -10000000..10000000>; max 4 items | no | Bounding box of the live content, same coordinates as the page boxes. If absent the ArtBox (when supplied) is used. |
Example request body
{
"pageBoxes": {
"mediaBox": [
0,
0,
612,
792
],
"trimBox": [
9,
9,
603,
783
],
"bleedBox": [
0,
0,
612,
792
],
"artBox": [
36,
36,
576,
756
]
},
"requirements": {
"unit": "mm",
"minBleed": 3,
"safeMargin": 5
}
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
effective | object | no | Each box after defaults and clipping to the media box, as [llx, lly, urx, ury] in points x UserUnit. |
defaulted | array<string> | no | Boxes that were absent and took their default. |
trimSize | object | no | |
bleed | object | no | Trim-to-bleed distance per side in points; negative means the bleed box is inside the trim box. |
safe | object | no | Trim-to-content distance per side in points (negative: content outside trim). |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the infra-preflight-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent