# Extract text from PDF (using OCR) > Supported in: Batch, Faster Extracts text from the pages in a PDF file with configurable OCR modes and output formats. **Expression categories:** Media ## Declared arguments * **Languages to detect:** Languages to detect in the input files.
*Set\>* * **Media reference:** The column containing media references to PDF files in a media set.
*Expression\* * **Scripts to detect:** Scripts to detect in the input files.
*Set\>* * *optional* **End page:** The end of the page range (inclusive). If no value is provided, it will default to the last page.
*Expression\* * *optional* **Error handling:** Determines the behavior of the pipeline for inputs that fail to process.
*Enum\* * *optional* **Extract method:** Choose how text is extracted. Conditional scan uses best-effort detection to scan pages with little or no digital text. Digital text extracts embedded digital text. Full-page scan scans every page.
*Enum\* * *optional* **Output format:** The format of the extracted text output.
*Enum\* * *optional* **Start page:** The start of the page range. If no value is provided, it will default to the first page.
*Expression\* **Output type:** *Array\* ## Examples ### Example 1: Base case **Argument values:** * **Languages to detect:** {`ENG`} * **Media reference:** `mediaReference` * **Scripts to detect:** {} * **End page:** `End Page` * **Error handling:** `FAIL_FAST` * **Extract method:** `AUTO` * **Output format:** `TEXT` * **Start page:** `Start Page` | mediaReference | **Output** | | ----- | ----- | | {"mimeType":"application/pdf","reference":{"type":"mediaSetItem","mediaSetItem":{"mediaSetRid":"ri.mio.main.media-set.a", "mediaItemRid":"ri.mio.main.media-item.a"}}} | \[ first page, second page ] | ***