---
title: "Converts an uploaded PDF file into text via Optical Character Recognition."
method: POST
path: "/ocr/pdf/toText"
tags: ["PdfOcr"]
---

# Converts an uploaded PDF file into text via Optical Character Recognition.

`POST /ocr/pdf/toText`

## Headers

- `recognitionMode` string
- `language` string
- `preprocessing` string

## Response `200`

OK

- PdfToTextResponse — Response from an OCR to text operation. Includes the confidence rating and converted text result.
  - `Successful` boolean — True if successful, false otherwise
  - `OcrPages` OcrPageResult[] — Page OCR results
    - `PageNumber` integer — Page number of the page that was OCR-ed, starting with 1 for the first page in the PDF file
    - `MeanConfidenceLevel` number, float — Confidence level rating of the OCR operation; ratings above 80% are strong.
    - `TextResult` string — Converted text string from the image input.
  - `AsyncJobID` string — When the job exceeds 25 pages, an Async Job ID is returned. Use the CheckPdfOcrJobStatus API to check on the status of this job using the AsyncJobID and get the result when it finishes
  - `AsyncJobStatus` string — Returns the job status of the Async Job, if applicable. Possible states are STARTED and COMPLETED

---

[API](https://skmtc.net/cloudmersive/apis/ocrapi.md) · [All operations](https://skmtc.net/cloudmersive/apis/ocrapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudmersive/ocrapi/revisions/809f1a173306/schema)
