{"uid":"cap_dwbsk6glXMQJ397o3onPv","slug":"tanod-docs-pdf-crop-e7d21348","name":"Tanod Docs PDF Crop","description":"Documents: DOCX template fill, Office to PDF, any file to Markdown, PDF to Word, OCR, PDF pipeline.","url":"https://docs.tanod.dev/v1/pdf/crop?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"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":{}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yOV_2y2Mm9XIfAJRrv6cd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Crops margins from a PDF file by specifying top, bottom, left, and right margins in points or percent, optionally targeting specific pages.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Remove scanned document borders","prompt":"I have a scanned PDF at https://storage.example.com/scan.pdf where each page has a thick black border about 5% on all sides — can you crop 5 percent off the top, bottom, left, and right using percent units and give me back a download link?"},{"title":"Trim header and footer from report","prompt":"Please crop pages 1-10 of this PDF (https://cdn.example.com/annual-report.pdf) by cutting 72 points from the top and 72 points from the bottom to remove the running headers and footers, and return the result as base64."},{"title":"Crop single page for presentation slide","prompt":"I need to crop just page 3 of this PDF (https://files.example.com/deck.pdf) — remove 100 points from the left and 100 points from the right — and give me back a download URL that I can share."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T12:42:26.476Z","isFirstParty":false,"canonicalSlug":"tanod-docs-pdf-crop-e7d21348"}