# Extract layout-aware content from PDF
> Supported in: Batch, Faster
Extracts layout-aware content from PDF pages. Returns structured blocks with bounding boxes, text content, and block types. Supports configurable OCR modes and output formats.
**Expression categories:** Media
## Declared arguments
* **Languages to detect:** Languages to detect in the PDF.
*Set\>*
* **Media reference:** The column containing media references to PDF files in a media set.
*Expression\*
* **Scripts to detect:** Scripts to detect in the PDF.
*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 content within blocks.
*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\, confidence:Double>>>*
## 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"}}} | \[ \[ {
**block\_id**: block-0,
**block\_index**: 0,
**block\_type**: Text,
&... ] |
***