convert_ocr_pdf
Convert scanned PDFs into searchable, editable documents using OCR. Choose quality, language, and skip OCR when text is already digital.
Instructions
Convert a PDF to a searchable, editable PDF using the PDF4me ConvertOcrPdf API (OCR). Provide the local path to the input PDF, quality (Draft or High), ocr_when_needed, and language (e.g. eng). The API request body only includes docContent, docName, qualityType, ocrWhenNeeded, and language. If the API returns 202, the tool polls the Location URL until the PDF is ready. Optional output directory and output file name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | OCR language code (e.g. eng). Empty defaults to eng. | eng |
| file_path | Yes | Local path to the PDF to process. | |
| output_dir | No | ||
| quality_type | No | Draft or High. | Draft |
| ocr_when_needed | No | When true, skip OCR if text is already searchable (sent as "true"/"false"). | |
| output_file_name | No |