Skip to main content
Version: 1.12.x (Next)

Paddle

Bundles contain custom components that support specific third-party integrations with Langflow.

This page describes the components that are available in the Paddle bundle.

The PaddleOCR component calls the PaddleOCR AI Studio async Job HTTP API to process images and PDFs. It supports two task types:

  • Document parsing: Layout-aware extraction into Markdown (PP-StructureV3, PaddleOCR-VL-1.6). Use this for PDFs, scanned documents, and content where reading order and structure matter.
  • OCR: Plain text recognition in scan order (PP-OCRv5, PP-OCRv6). Use this for images with simple text content.

The component talks to the API over HTTP and does not require the paddleocr Python SDK.

Install the Paddle bundle

The Paddle bundle is included in the lfx-paddle Extension bundle, which is installed automatically as part of uv pip install langflow.

If you need to install it separately, run:

uv pip install lfx-paddle
uv run langflow run

To verify the bundle is loaded in your environment:

lfx extension list

Prerequisites

PaddleOCR

The PaddleOCR component uploads one or more image or PDF files to the PaddleOCR AI Studio Job API, polls until each job completes, and returns the extracted text.

Supported file types: png, jpg, jpeg, bmp, tiff, webp, and pdf.

It outputs a Table with one row per processed file. Each row includes fields such as text, file_path, task_type, output_format, model, job_id, and pages.

  • For document parsing, text is Markdown and output_format is markdown.
  • For OCR, text is plain text and output_format is plain_text.

Use the PaddleOCR component in a flow

  1. Get an access token from Baidu AI Studio.

  2. In Langflow, add the PaddleOCR component from the Paddle bundle.

  3. Enter your token in the AI Studio Access Token field, or add it as a global variable.

  4. Upload one or more supported files, or connect a server file path.

  5. Select a Task Type:

    • document_parsing for layout-aware Markdown using models PP-StructureV3 or PaddleOCR-VL-1.6.
    • ocr for plain text recognition using models PP-OCRv6 or PP-OCRv5.
  6. Select a Model. The available models change based on the selected task type.

  7. Connect a Chat Output or other downstream component to the Files output to inspect the extracted text.

  8. Click Playground to run the flow.

PaddleOCR parameters

Some parameters are hidden by default in the visual editor. You can modify all component parameters through the component inspection panel that appears when you select a component.

NameTypeDescription
Files (path)FileInput parameter. One or more image or PDF files to process. Supported types: png, jpg, jpeg, bmp, tiff, webp, pdf.
AI Studio Access Token (access_​token)SecretStringInput parameter. Baidu AI Studio access token used to authenticate Job API requests. Required.
Task Type (task_​type)DropdownInput parameter. document_​parsing for layout-aware Markdown, or ocr for plain text recognition. Default: document_​parsing.
Model (model)DropdownInput parameter. PaddleOCR model for the selected task type. For document parsing: PP-StructureV3 (default), PaddleOCR-VL-1.6. For OCR: PP-OCRv6 (default), PP-OCRv5.
Base URL (base_​url)StringInput parameter. Optional PaddleOCR service root URL. Leave empty to use the official default (https://paddleocr.aistudio-app.com). Advanced.
Timeout (s) (poll_​timeout)IntegerInput parameter. Maximum time in seconds to wait for each PaddleOCR job to complete. Default: 600. Advanced.
Document Orientation Classification (use_​doc_​orientation_​classify)BooleanInput parameter. Enable document orientation classification. Default: false. Advanced.
Document Unwarping (use_​doc_​unwarping)BooleanInput parameter. Enable document unwarping. Default: false. Advanced.
Text Line Orientation (use_​textline_​orientation)BooleanInput parameter. OCR option. Enable text line orientation detection. Default: false. Advanced.
Text Detection Threshold (text_​det_​thresh)FloatInput parameter. OCR option. Text detection threshold. Advanced.
Text Detection Box Threshold (text_​det_​box_​thresh)FloatInput parameter. OCR option. Text detection box threshold. Advanced.
Text Detection Unclip Ratio (text_​det_​unclip_​ratio)FloatInput parameter. OCR option. Text detection unclip ratio. Advanced.
Text Recognition Score Threshold (text_​rec_​score_​thresh)FloatInput parameter. OCR option. Text recognition score threshold. Advanced.
Table Recognition (use_​table_​recognition)BooleanInput parameter. Document parsing option. Enable table recognition. Default: true. Advanced.
Formula Recognition (use_​formula_​recognition)BooleanInput parameter. Document parsing option. Enable formula recognition. Default: false. Advanced.
Chart Recognition (use_​chart_​recognition)BooleanInput parameter. Document parsing option. Enable chart recognition. Default: false. Advanced.
Seal Recognition (use_​seal_​recognition)BooleanInput parameter. Document parsing option. Enable seal recognition. Default: false. Advanced.
Prettify Markdown (prettify_​markdown)BooleanInput parameter. Document parsing option. Return prettier Markdown when supported. Default: true. Advanced.
Temperature (temperature)FloatInput parameter. PaddleOCR-VL option. Sampling temperature. Advanced.
Top P (top_​p)FloatInput parameter. PaddleOCR-VL option. Nucleus sampling top_​p. Advanced.
Visualize (visualize)BooleanInput parameter. Document parsing option. Generate visualization outputs when supported. Default: false. Advanced.
Server File Path (file_​path)Data, JSON, or MessageInput parameter. Alternative to Files. A Data object with a server file path, or a Message with a path. Advanced.
Separator (separator)StringInput parameter. Separator used between multiple outputs in Message format. Default: \n\n. Advanced.
Silent Errors (silent_​errors)BooleanInput parameter. If true, errors do not raise an exception. Advanced.
Delete Server File After Processing (delete_​server_​file_​after_​processing)BooleanInput parameter. If true, deletes the server file path after processing. Default: true. Advanced.
Ignore Unsupported Extensions (ignore_​unsupported_​extensions)BooleanInput parameter. If true, files with unsupported extensions are skipped. Default: true. Advanced.
Ignore Unspecified Files (ignore_​unspecified_​files)BooleanInput parameter. If true, Data objects without a server file path are ignored. Default: false. Advanced.
Files (dataframe)TableOutput parameter. One row per processed file, including extracted text and job metadata.

See also

Was this page helpful?

Support
Search