Extract Text
AI-generatedSummary
Extract text content from a binary file using Apache Tika, with customizable output format and OCR options.
Inputs
- binaryPropertyName (required) — Specify the name of the binary property containing the file to process.
- outputFormat (required) — Choose the format of the extracted text output: Plain Text, HTML, or XML (XHTML).
- options — Optional settings including Content Type Override (to specify or override MIME type sent to Tika), OCR Language (Tesseract language code), OCR Strategy (how to handle PDFs with text and/or images), and Password (for encrypted documents).
Output shape
a list of items, each containing a json object with a single field 'text' holding the extracted text as a trimmed string, and the original binary data preserved
The extracted text is returned in the specified output format as a string under the 'text' property. If the input binary data is missing or invalid, or if the Tika server cannot be reached, an error is returned unless 'Continue on Fail' is enabled.
Examples
Example 1: Extract plain text from a PDF stored in the binary property 'data' with OCR in English enabled and default PDF OCR strategy.
Set 'Binary Property' to 'data', 'Output Format' to 'Plain Text', and under 'Options' set 'OCR Language' to 'eng' and 'OCR Strategy' to 'auto'.