Convert PDF to Editable PDF using OCR
Find & Search → Convert PDF to Editable PDF using OCR
The Convert PDF to Editable PDF using OCR API turns image-based or scanned PDFs into searchable, editable PDFs using OCR. You send the PDF as Base64 (docContent), docName, qualityType (Draft or High), ocrWhenNeeded (true/false), optional language, outputFormat, isAsync, and optionally mergeAllSheets. The API returns the converted PDF (editable text layer). Use the tester below to try it; more details are in the sections that follow.
Try the Convert PDF to Editable PDF using OCR API
Endpoint: POST /api/v2/ConvertOcrPdf · Required: api-key, docContent, docName, qualityType, ocrWhenNeeded, outputFormat, isAsync
Use the form below to send your API key, PDF (Base64), quality (Draft/High), and whether to run OCR only when needed. The response is the converted editable PDF. No code required—fill the fields and click Send request.
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Convert PDF to Editable PDF using OCR?
This endpoint converts image-based or scanned PDFs into fully editable, searchable PDFs using OCR. You provide the PDF (Base64), qualityType (Draft for faster processing, High for better accuracy on scanned documents), ocrWhenNeeded (true to skip OCR if text is already searchable, false to always run OCR), and optional language. The API returns a PDF with an invisible text layer so text can be selected, searched, and edited.
Key features
- OCR – Extracts text from scanned or image-based PDFs and adds a searchable text layer.
- Quality – qualityType: Draft (faster, 1 call per file) or High (better accuracy, 2 calls per page for scanned docs).
- ocrWhenNeeded – true skips OCR when the PDF already has searchable text; false always runs OCR.
- Language – Optional language (e.g. English, Spanish, French, German) for better recognition.
- Async – isAsync for large or multi-page scanned PDFs.
Use when you have scanned documents or image-only PDFs and need searchable, editable text. For extracting text only use Extract Resources or Image Extract Text.
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). |
| docName | string | Yes | PDF file name with .pdf extension. |
| qualityType | string | Yes | Draft (faster) or High (better for scanned docs). |
| ocrWhenNeeded | string | Yes | true = skip if text is already searchable; false = always run OCR. |
| language | string | No | Language of text (e.g. English, Spanish, French, German). |
| outputFormat | string | Yes | Output format (e.g. true for standard). |
| isAsync | boolean | Yes | Enable asynchronous processing. |
| mergeAllSheets | boolean | No | Merge all sheets if applicable. |
When to use Convert PDF to Editable PDF using OCR
- Scanned documents – Convert scanned PDFs (invoices, forms, letters) into searchable, editable PDFs.
- Image-only PDFs – Add a text layer to PDFs that were created from images so text can be selected and searched.
- Archives – Make legacy scanned documents searchable for compliance or search.
- Accessibility – Enable screen readers and copy-paste for image-based PDFs.
For request/response schemas and code samples, see Convert PDF to Editable PDF using OCR 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 or a public URL to a PDF file
Response Format
The API returns a JSON response with the converted editable PDF encoded in Base64 format.