{"uid":"cap__db8OuR0NufL3iKWD9g8z","slug":"tanod-pdf-flatten-85bbb0a5","name":"Tanod PDF Flatten","description":"One MCP server and HTTP API with 193 pay-per-call tools for AI agents (security checks, chain data, finance, aviation, documents), plus free uptime and MikroTik monitoring and 130+ free browser tools. No signup; free daily tier. Operated by an AI.","url":"https://tanod.dev/v1/pdf/flatten?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"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."},"mode":{"enum":["all","screen","print"],"type":"string","default":"all","description":"all (default): every visible annotation and form field; screen: what a viewer shows; print: what is marked for printing. Annotations the mode does not flatten are removed."},"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":"flattened.pdf","bytes":89021,"pages":6,"data_base64":"JVBERi0xLjcKJb/3... (trimmed: 118,696 base64 characters in the reply)","content_type":"application/pdf"},"mode":"all","warnings":[],"operation":"flatten","input_bytes":140815,"input_pages":6,"output_bytes":89021,"dropped_widgets":15,"annotations_after":0,"appearances_drawn":0,"untrusted_content":true,"annotations_before":23,"flattened_annotations":8,"active_content_removed":{"javascript":1}}},"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_WWwsh-a35LFt_eaqZDXgt","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":"Flattens PDF annotations, form fields, and interactive elements into static content, removing active content like JavaScript","exampleAgentPrompt":"Can you flatten this PDF so all the form fields and annotations are permanently baked in and any JavaScript is removed? Here's the URL: https://example.com/myform.pdf — use 'all' mode so everything visible gets flattened.","exampleUseCases":[{"title":"Sanitize PDF before sharing","prompt":"I need to send this PDF contract to a client but I want to make sure all the form fields are locked in and any embedded JavaScript is stripped out first — can you flatten it using the URL https://example.com/contract.pdf?"},{"title":"Archive filled PDF form permanently","prompt":"We have a completed intake form PDF at https://hr.example.com/intake_filled.pdf and need to archive it as a static document with no editable fields — please flatten all annotations and form widgets so it's fully fixed."},{"title":"Prepare PDF for print-safe output","prompt":"Flatten this PDF using print mode so only the print-marked annotations get baked in and the rest are dropped — the file is at https://docs.example.com/report.pdf and I need a clean static version for our print workflow."}],"resultDescription":"Returns a JSON object containing the flattened PDF as a base64-encoded string, along with metadata including file name, byte size, page count, flatten mode used, number of annotations before and after, number of dropped widgets, number of appearances drawn, whether untrusted content was detected, and any active content (e.g. JavaScript) that was removed, plus any warnings encountered during processing.","failureModes":["PDF URL is not publicly accessible or resolves to a private/internal host — request refused","PDF exceeds 20 MB (URL) or 10 MB decoded (base64) — size limit error","Malformed or password-protected PDF — processing failure","Neither url nor pdf_base64 provided — validation error","Invalid base64 encoding in pdf_base64 — parse error","Invalid mode enum value — validation error"],"whenToPreferThis":"Choose this endpoint when you need to permanently embed PDF annotations, form data, and widget appearances into static page content, especially when security sanitization (removing JavaScript or active content) is also required. It is particularly useful for archiving filled forms, preparing PDFs for sharing with untrusted recipients, or producing print-ready static documents. Prefer it over generic PDF conversion tools when you need granular control over which annotation layers to flatten (all, screen, or print modes).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T12:41:51.608Z","isFirstParty":false,"canonicalSlug":"tanod-pdf-flatten-85bbb0a5"}