Repair PDF Document
PDF → Repair PDF Document
The Repair PDF Document API attempts to repair corrupted or damaged PDFs. You send the PDF as Base64 (docContent), docName, and optionally async. The API returns a repaired PDF if repair succeeds. Use the tester below to try it; more details are in the sections that follow.
Try the Repair PDF Document API
:::note Quick reference
Endpoint: POST /api/v2/RepairPdf · Required: api-key, docContent, docName
:::
:::info Try it live Use the form below to send your API key and PDF (Base64; may be corrupted or damaged). The response is the repaired PDF if successful. No code required—fill the fields and click Send request. :::
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Repair PDF Document?
This endpoint attempts to repair a corrupted or damaged PDF. You provide the PDF (Base64; may be corrupted or have structural issues); the API tries to fix it and returns a repaired PDF if successful. Use it when a PDF fails to open or has structural errors.
Key features
- Repair – Attempts to fix corrupted or damaged PDFs and structural issues.
- Single PDF – docContent (Base64), docName (output name).
- Async – Use async for large or complex PDFs.
:::tip Best for Use when a PDF is corrupted, damaged, or fails to open. For reading metadata use Get PDF Metadata. :::
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | PDF file content (Base64); may be corrupted or damaged. |
| docName | string | Yes | Output PDF file name (e.g. output.pdf). |
| async | boolean | No | Enable asynchronous processing. |
When to use Repair PDF Document
- Corrupted PDFs – Try to repair PDFs that fail to open or display incorrectly.
- Structural issues – Fix PDFs with broken structure or invalid references.
- Recovery – Attempt to recover content from damaged or incomplete PDFs.
:::info Need the full API? For request/response schemas and code samples, see Repair PDF Document 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 file in Base64 format (may be corrupted or damaged)
Response Format
The API returns a repaired PDF file if the repair is successful.