# PaddleOCR: Python Setup, Outputs, and Managed Alternatives

> Install PaddleOCR in Python, run a pinned example, read its text, box, and structure outputs, and see when a managed parser like Reducto is a better fit.

Canonical: https://reducto.ai/guides/paddleocr

## The short answer

[PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR) is Baidu's open-source, Apache 2.0 toolkit for OCR and document parsing, built on the PaddlePaddle framework. It is more than a text reader. The current 3.x releases include a general OCR pipeline (PP-OCRv6 by default), the PP-StructureV3 pipeline for layout, tables, formulas and Markdown or JSON output, and the PaddleOCR-VL vision-language models for document parsing.

To get started in Python, install the PaddlePaddle inference engine and the `paddleocr` package, then call `PaddleOCR().predict()` on an image or PDF. You get recognized text, a confidence score and coordinates for every detected line. The example below was run with PaddleOCR 3.7.0 and PaddlePaddle 3.2.0.

If you need document structure but do not want to run the OCR pipeline yourself, [Reducto Parse](https://reducto.ai/parse) is a managed alternative covered at the end of this guide.

## What PaddleOCR does

PaddleOCR is organized as pipelines that combine smaller models:

- **General OCR (PP-OCR).** Detects text regions and recognizes each line, with optional document orientation, unwarping and text-line orientation steps. The default PP-OCRv6 model covers 50 languages in one model, and the wider model family covers more than 100.
- **PP-StructureV3.** Adds layout detection, table recognition, formula recognition and reading-order recovery, and saves results as Markdown or JSON with block and table coordinates.
- **PaddleOCR-VL.** A compact vision-language model family for page-level document parsing with Markdown and JSON output.

The project supports Linux, Windows and macOS, Python 3.8 to 3.12, and CPU, GPU, XPU and NPU hardware. Models can also be served over HTTP, exported to ONNX, or run on mobile and in the browser. So PaddleOCR is not text-only; the real question is which pipeline fits your documents and how much you want to operate.

## PaddleOCR installation

The [official installation guide](https://www.paddleocr.ai/latest/en/version3.x/installation.html) separates the `paddleocr` package from the inference engine. For a CPU-only Linux machine, the pinned versions used in this guide are:

```bash
python3.12 -m venv .venv && source .venv/bin/activate

# Inference engine: PaddlePaddle 3.2.0, CPU build from the official index
python -m pip install paddlepaddle==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/

# PaddleOCR 3.7.0 (general OCR only)
python -m pip install paddleocr==3.7.0

# Optional: PP-StructureV3 and other document-parsing pipelines
python -m pip install "paddleocr[doc-parser]==3.7.0"
```

For NVIDIA GPUs, install the matching `paddlepaddle-gpu` wheel from the [PaddlePaddle installation page](https://www.paddleocr.ai/latest/en/version3.x/paddlepaddle_installation.html) and pass `device="gpu"`. Model weights download automatically on first run.

In our test, `paddlepaddle` 3.3.1 from PyPI raised a `NotImplementedError` on CPU. The documented 3.2.0 build worked, as did passing `enable_mkldnn=False`. Pin both packages.

## Run a PaddleOCR Python example

We created a synthetic invoice image (1000 × 640 pixels) with a header, a four-column line-item table and a total. This script uses the 3.x Python API:

```python
from paddleocr import PaddleOCR

ocr = PaddleOCR(
    use_doc_orientation_classify=False,
    use_doc_unwarping=False,
    use_textline_orientation=False,
)

for res in ocr.predict("synthetic_invoice.png"):
    data = res.json["res"]
    for text, score, box in zip(data["rec_texts"], data["rec_scores"], data["rec_boxes"]):
        print(f"{score:.3f}  {box}  {text}")
    res.save_to_json("output")
```

Actual output (model download logs removed, some rows trimmed):

```text
0.997  [59, 56, 505, 83]  NORTHWIND SUPPLY CO.
1.000  [58, 107, 273, 131]  Invoice INV-20481
0.995  [58, 145, 453, 168]  Date: 2026-11-03 Due: 2026-12-03
0.999  [65, 220, 122, 247]  Item
1.000  [476, 219, 524, 252]  Qty
1.000  [616, 218, 733, 249]  Unit price
1.000  [797, 221, 894, 245]  Amount
1.000  [68, 276, 223, 300]  Steel brackets
1.000  [475, 273, 511, 303]  40
1.000  [615, 273, 683, 303]  $2.50
1.000  [796, 274, 889, 302]  $100.00
...
1.000  [614, 460, 684, 489]  Total
1.000  [795, 459, 895, 490]  $190.00
```

The default pipeline loaded `PP-OCRv6_medium_det` and `PP-OCRv6_medium_rec`. The CLI equivalent we ran was `paddleocr ocr -i synthetic_invoice.png --save_path ./cli_out --use_doc_orientation_classify False --use_doc_unwarping False --use_textline_orientation False`.

Older tutorials use the 2.x style, such as `ocr.ocr(img, cls=True)` with `use_angle_cls=True`. In 3.7.0, `ocr()` is deprecated in favor of `predict()`, and `use_angle_cls` maps to `use_textline_orientation`, so update older code before you copy it.

## Read text, coordinates, and structured outputs

Each general OCR result holds parallel lists, one entry per detected line:

- `rec_texts`: the recognized string.
- `rec_scores`: recognition confidence from 0 to 1.
- `rec_boxes`: an axis-aligned box as `[x_min, y_min, x_max, y_max]` in pixels.
- `rec_polys`: the four corner points, which matter for rotated or curved text.

For PDF input, you get one result per page, with `page_index` set. The output is a flat list of lines, so table cells appear as separate strings. Your code has to rebuild rows and columns from the coordinates.

PP-StructureV3 does that reconstruction. On the same synthetic invoice, `PPStructureV3().predict()` returned a `parsing_res_list` with a `paragraph_title`, a `text` block and a `table` block holding HTML rows, each with a bounding box, and `save_to_markdown()` wrote a Markdown file with an HTML table. In our run, the Total row, which sat below the last ruled line, did not appear in the structured output even though general OCR read it. That is one synthetic page, not a benchmark, but it shows why structured output must be checked against your own documents.

## Deployment and document-complexity tradeoffs

<Table html={"<table>\n  <thead>\n    <tr>\n      <th>Factor</th>\n      <th>What PaddleOCR gives you</th>\n      <th>What you still own</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>Control</td>\n      <td>Open models you can fine-tune, run offline, or export to ONNX</td>\n      <td>Model selection, versions, and regression tests</td>\n    </tr>\n    <tr>\n      <td>Hardware</td>\n      <td>CPU, GPU, XPU, NPU, mobile, and browser options</td>\n      <td>Capacity planning, autoscaling, and dependency pinning</td>\n    </tr>\n    <tr>\n      <td>Serving</td>\n      <td>Self-hosted serving options</td>\n      <td>Queues, retries, monitoring, and uptime</td>\n    </tr>\n    <tr>\n      <td>Complex documents</td>\n      <td>Layout, tables, formulas, and Markdown through PP-StructureV3 and PaddleOCR-VL</td>\n      <td>Choosing pipelines and validating tables, reading order, and long PDFs</td>\n    </tr>\n  </tbody>\n</table>"} />

PaddleOCR fits well when data must stay on your hardware, you want model-level control, or you read scene text, labels and short images. Longer, more varied documents (multi-page tables, mixed scans, forms) mean more pipeline stages to tune and test. Our [OCR model comparison](https://reducto.ai/guides/best-ocr-models-accuracy-speed-cost) and [PDF OCR software guide](https://reducto.ai/guides/best-pdf-ocr-software-ai-workflows) place PaddleOCR next to Tesseract, docTR, Docling and managed APIs.

## When to consider Reducto

Consider [Reducto Parse](https://reducto.ai/parse) when you need document structure in production and would rather not operate the OCR, layout and table stack. Parse runs on Reducto's r-1 model and returns Markdown content plus typed blocks such as `Title`, `Key Value` and `Table`, each with a normalized bounding box, page number and confidence level. See the [response format](https://docs.reducto.ai/parse/response-format) for details.

We sent the same synthetic invoice to Parse with `settings.model` set to `"r-1"`. Trimmed actual output:

```json
{
  "type": "Table",
  "content": "<table><tr><th>Item</th><th>Qty</th><th>Unit price</th><th>Amount</th></tr>...<tr><td></td><td></td><td><b>Total</b></td><td><b>$190.00</b></td></tr></table>",
  "bbox": { "left": 0.056, "top": 0.326, "width": 0.886, "height": 0.436, "page": 1 },
  "confidence": "high"
}
```

Parse also supports [table output formats](https://docs.reducto.ai/configs/parse/table-output-formats) such as HTML, Markdown, JSON and CSV, and [word-level citations](https://docs.reducto.ai/configs/parse/citations). For deployment, Enterprise customers can use [Hybrid VPC or full VPC](https://docs.reducto.ai/enterprise/enterprise-readiness) options. The tradeoff is less model-level control than a self-hosted PaddleOCR stack. To compare on your own files, upload a document in [Reducto Studio](https://studio.reducto.ai).

## Frequently asked questions

### Is PaddleOCR free for commercial use?

Yes. PaddleOCR is released under the Apache 2.0 license. You still pay for the hardware and engineering time to run it.

### Can PaddleOCR read PDFs?

Yes. `predict()` accepts a PDF file path or URL and returns one result per page. Folders of PDFs are not supported as a single input, so pass each file path.

### Does PaddleOCR need a GPU?

No. The example in this guide ran on CPU. A GPU helps with throughput and with the larger PP-StructureV3 and PaddleOCR-VL pipelines.

### Is PaddleOCR only for plain text?

No. General OCR returns text and coordinates, while PP-StructureV3 and PaddleOCR-VL return layout, tables, formulas and Markdown or JSON.

### Why does my old PaddleOCR code break?

Most older examples target the 2.x API. In 3.x, use `predict()` instead of `ocr()`, `use_textline_orientation` instead of `use_angle_cls`, and `device="gpu"` instead of older GPU flags.
