> ## Documentation Index
> Fetch the complete documentation index at: https://docs.context.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Setting up Context.dev for a user? Follow https://docs.context.dev/agent-quickstart.md. MCP clients sign in with OAuth and need no API key; application code reads CONTEXT_DEV_API_KEY.

# PDFs and OCR

> Read scanned PDFs and images, with optional PDF page ranges.

OCR is off by default. PDF text layers are read directly; `ocr=true` recovers text from scanned pages and image inputs.

## Select PDF pages

Add `ocr=true`, `pdf[start]=1`, and `pdf[end]=5` to the Parse request query. Page numbers are inclusive and start at 1. The end must be at least the start.

For example, use the [Parse upload request](/parse/overview) with the query `?extension=pdf&ocr=true&pdf[start]=1&pdf[end]=5`. URL-encode bracketed parameter names when your client requires it.

## Text layers and scans

OCR runs on selected PDF pages without usable text; pages with text retain their existing extraction. It is not a general description of every chart or photograph. A scanned PDF with OCR off returns `400 PDF_IMAGES_ONLY` from Parse.

Standalone images return metadata without OCR. Enable `ocr=true` when you need the image’s text.

The [Scrape URL workflow](/scrape/pdfs-and-documents) uses different option names: `sharedParams.parsers.pdf.ocr: "auto"`, `startPage`, and `endPage`. Its text outputs can fail inside HTTP 200. ZDR disables OCR where supported; see [zero data retention](/optimization/zero-data-retention).
