PDF Api Hub icon

PDF Api Hub

HTML to PDF

Actions36

OCR — Read Scanned PDFs & Image → Image OCR Parse

AI-generated

Summary

Extracts text from an image using OCR and returns the API response in the selected format. Provide the image by public URL, base64 string or data URL, or a binary property from an incoming item; choose the OCR language and optionally tune image processing and text recognition settings.

Inputs

  • Input Type (required) — Choose URL, Base64, or Binary File. URL is the default.
  • Image URL (required) — Publicly accessible image URL; used when Input Type is URL. Defaults to a sample invoice image URL.
  • Base64 Image (required) — Raw base64 image data or a data URL; used when Input Type is Base64.
  • Binary Property Name (required) — Name of the incoming binary property containing the image; used when Input Type is Binary File. Defaults to data.
  • Advanced Options — Optional OCR settings: threshold (0 disables binarization), character whitelist, grayscale, Tesseract engine mode (OEM), page segmentation mode (PSM), resize scale (0 disables resizing), and sharpening.
  • Language — Tesseract language code, default eng; supports custom codes and combinations such as eng+por.
  • Detail Level — Choose text only or words with bounding boxes. Defaults to text only.
  • Response Format — Choose structured JSON or plain text. Defaults to JSON.

Output shape

OCR result from the API, returned as JSON or plain text according to Response Format.

The provided source pack contains only the action's function signature, so it does not reveal the exact response fields or whether the result is wrapped in n8n items. The property descriptions indicate that JSON includes pages, confidence, and metadata; text-only detail provides confidence per page, while words detail adds per-word positions and confidence.

Links

Discussion