Skip to content

PDF Get Text

Type: pdf-get-text  ·  Package: PDF Activities v1.0.0  ·  Output: string

Extracts all text from a PDF, joining the content of all its pages into a single string. It is the central activity to read documents: invoices, contracts, reports — and then extract concrete data with regular expressions.

Reads the text from each page of the PDF and concatenates it, separating the pages with separator (by default, two line breaks). Returns the result as a string.

ParameterEditorDescription
pathexpressionPDF file path.
ParameterEditorDescription
separatorexpressionSeparator between pages. By default, two line breaks.

Returns a string with all the PDF text.

Extract the total and number of an invoice:

PDF Get Text path = = rutaFactura → output: texto
Set Variable name = numero value = = regexFind(texto, "FAC-\d+")
Set Variable name = total value = = regexFind(texto, "Total:\s*\$?([\d.,]+)")