Flatten PDF
Convert → Flatten PDF
The Flatten PDF API removes form controls, interactive elements, and annotations from a PDF. You send the PDF as Base64 (docContent), docName, and IsAsync. The API returns a static, non-editable PDF (or 202 + Location for async). Use the tester below to try it; more details are in the sections that follow.
Try the Flatten PDF API
Endpoint: POST /api/v2/FlattenPdf · Required: api-key, docContent, docName, IsAsync
Use the form below to send your API key and PDF (Base64). The response is the flattened PDF (or polling URL when async). No code required—fill the fields and click Send request.
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Flatten PDF?
This endpoint flattens a PDF by removing form controls, interactive elements, and annotations. You provide the PDF (Base64), docName, and IsAsync. The API returns a static PDF where form fields and annotations are merged into the page content. Returns the flattened PDF or a Location URL for async.
Key features
- Static output – Form fields and annotations become non-editable content.
- Single request – Send docContent, docName, IsAsync; no extra configuration.
- Async – IsAsync returns 202 with Location URL for polling.
Use when you need a non-editable PDF for distribution or archival. For fillable forms use Fill PDF Form or Convert Word to PDF Form.
When to use Flatten PDF
- Distribution – Flatten filled forms before sharing so values cannot be changed.
- Archival – Store a static version of a form or annotated PDF.
- Pipelines – Flatten after Fill PDF Form before merge or distribution.
For request/response schemas and code samples, see Flatten PDF in the PDF4me API docs.
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A PDF document in Base64 format
Response Format
The API returns a flattened PDF document:
- Status 200: PDF flattening completed immediately - binary PDF content in response body
- Status 202: Request accepted and processing asynchronously - use the Location header URL to poll for results
For asynchronous requests, poll the Location URL until status 200 is returned with the flattened PDF document.