EXTRACTTEXT
Overview
The EXTRACTTEXT workflow application extracts text content from an input file (.pdf, .docx, .txt, .xml, .htm, .html, or .md) and returns the extracted text and its length. It supports optional parameters for maximum file size, trimming, and text normalization (Unix-style line breaks).
Parameters
Required parameters
FILE
FILE
IN
The file from which to extract the text (must be .pdf, .docx, .txt, .xml, .htm, .html, or .md)
TEXT
TEXT
OUT
The extracted (and possibly normalized/trimmed) text
LENGTH
NUMERIC
OUT
The length (number of characters) of the extracted text
Optional parameters
MAX_FILE_SIZE
NUMERIC
IN
Maximum allowed file size in MB
TRIM_SIZE
NUMERIC
IN
Maximum number of characters to keep from the extracted text
NORMALIZE
TEXT
IN
Whether to normalize line endings Possible values:
YNtruefalse
Supported file types
Documents must be provided in one of the following formats. The system validates file format before processing extraction.
.pdf
Portable Document Format
Text is extracted from all pages, including form fields.
Word
.docx
Microsoft Word documents (Office Open XML)
Text is extracted from paragraphs, tables, headers, footers, and text boxes.
Plain text
.txt
Plain text files
Content is returned as-is.
XML
.xml
XML documents
All text content from XML nodes is extracted; element tags are stripped.
Processing is secured against XXE (XML External Entity) attacks.
HTML
.html, .htm
HTML documents
Readable text is extracted after removing
<script>,<style>, and<noscript>elements.<br>tags are converted to line breaks.HTML entities (e.g.,
&,<,©) are decoded to their characters.Whitespace is normalized.
Markdown
.md
Markdown files
Content is returned as-is, preserving all markdown syntax (headings, links, formatting, etc.). Markdown is human-readable and well-suited for semantic search without syntax stripping.
Error messages
ExtractText: File must be a PDF, DOCX, TXT, XML, HTM, HTML or MD.
File extension is not one of the supported types
XML parsing error (e.g. DtdProcessing is set to Prohibit)
XML file contains a DTD declaration (blocked for security)
XML parsing error (e.g. Data at the root level is invalid)
XML file is malformed or not valid XML
Last updated