# Tanod Docs PDF Crop

> Tanod Docs PDF Crop is a paid API for AI agents from docs.tanod.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-13).

Crops margins from a PDF file by specifying top, bottom, left, and right margins in points or percent, optionally targeting specific pages.

## Facts

- Endpoint: POST https://docs.tanod.dev/v1/pdf/crop?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanod-docs-pdf-crop-e7d21348
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dwbsk6glXMQJ397o3onPv

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 tanod-docs-pdf-crop-e7d21348 -d '<json body>'
```

Example prompt: Can you crop my PDF at this URL — https://example.com/report.pdf — by removing 50 points from the top and 30 points from the bottom on all pages, and give me the result as a base64 file?

## When to prefer this

Choose this endpoint when you need to programmatically remove margins or borders from PDF pages — especially for cleaning up scanned documents, removing headers/footers, or reframing content before further processing. Prefer it over general PDF editors when you need a simple, scriptable API call with precise point or percentage-based margin control and optional per-page targeting.

## Known failure modes

- PDF URL is private, internal, or IP-literal — returns error refusing the URL
- PDF exceeds 20 MB (URL) or 10 MB decoded (base64) — returns size limit error
- Invalid page range format — returns validation error
- Margin values out of range (>14400) — returns validation error
- URL is unreachable or returns non-PDF content — returns fetch or parsing error

## How this service works

Documents: DOCX template fill, Office to PDF, any file to Markdown, PDF to Word, OCR, PDF pipeline.

## Output

Returns either a base64-encoded cropped PDF inline or a temporary download URL (valid 24 hours), along with metadata including output byte size, page count, page dimensions in points, and a flag indicating whether untrusted/active content was removed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "top": {
   "type": "number",
   "default": 0,
   "maximum": 14400,
   "minimum": 0,
   "description": "Margin to cut from the top edge of the page as displayed, in `unit` (default 0)."
  },
  "url": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 2048,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Public http(s) URL of the PDF (at most 20 MB; private, internal and IP-literal hosts are refused); or use pdf_base64."
  },
  "left": {
   "type": "number",
   "default": 0,
   "maximum": 14400,
   "minimum": 0,
   "description": "Margin to cut from the left edge, in `unit` (default 0)."
  },
  "unit": {
   "enum": [
    "pt",
    "percent"
   ],
   "type": "string",
   "default": "pt",
   "description": "pt (1/72 inch, default) or percent of the displayed page's width (left, right) and height (top, bottom)."
  },
  "pages": {
   "anyOf": [
    {
     "type": "string",
     "pattern": "^[0-9a-zA-Z ,\\-]+$",
     "maxLength": 200,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Pages to crop (default all), e.g. 1-3,5."
  },
  "right": {
   "type": "number",
   "default": 0,
   "maximum": 14400,
   "minimum": 0,
   "description": "Margin to cut from the right edge, in `unit` (default 0)."
  },
  "bottom": {
   "type": "number",
   "default": 0,
   "maximum": 14400,
   "minimum": 0,
   "description": "Margin to cut from the bottom edge, in `unit` (default 0)."
  },
  "output": {
   "enum": [
    "base64",
    "url"
   ],
   "type": "string",
   "default": "base64",
   "description": "base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."
  },
  "pdf_base64": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 13398872,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "The PDF as base64 (at most 10 MB decoded per request); or use url."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "file": {
   "name": "cropped.pdf",
   "bytes": 13218,
   "pages": 1,
   "data_base64": "JVBERi0xLjQKJb/3... (trimmed: 17,624 base64 characters in the reply)",
   "content_type": "application/pdf"
  },
  "unit": "pt",
  "boxes": [
   {
    "page": 1,
    "width_pt": 523,
    "height_pt": 770
   }
  ],
  "operation": "crop",
  "input_bytes": 13264,
  "input_pages": 1,
  "output_bytes": 13218,
  "cropped_pages": 1,
  "boxes_truncated": false,
  "untrusted_content": true,
  "active_content_removed": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-docs-pdf-crop-e7d21348/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from docs.tanod.dev](https://www.zero.xyz/host/docs.tanod.dev/llms.txt)
