Skip to content
Seal
Esc
↑↓navigate↵open⌘Jpreview

Crop pages of a draft PDF (baked into new page size)

For each listed page, keep only the top-left percent-of-page rect (x,y,width,height in 0–100 — same space as fields). Content is baked into a smaller page via pdf-lib. Fields fully inside the crop are remapped; fields that intersect the cut edge are removed. Unlisted pages are copied unchanged.

POST/documents/pdf/crop
Authorization
AuthorizationBearer token · headerrequired

Pass your API key as a Bearer token. API keys are scoped to specific operations — configure scopes in your organization's Settings → Developer → API Keys.

Request body
requiredapplication/json
idstringrequired
cropsobject[]required
min items 1 · max items 500
Show properties
Array of object
pageintegerrequired
min 1
xnumberrequired
min 0 · max 100
ynumberrequired
min 0 · max 100
widthnumberrequired
min 1 · max 100
heightnumberrequired
min 1 · max 100
Responses
200

Cropped

successboolean
storage_idstring
page_countinteger
fields_removedinteger
fields_remappedinteger
400

Invalid crop rect or page

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://api.seal.nyc/api/v1/documents/pdf/crop" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "string",
  "crops": [
    {
      "page": 1,
      "x": 0,
      "y": 0,
      "width": 1,
      "height": 1
    }
  ]
}'
Response
{
  "success": true,
  "storage_id": "string",
  "page_count": 0,
  "fields_removed": 0,
  "fields_remapped": 0
}