Skip to content

PDF Search Text

Type: pdf-search-text  ·  Package: PDF Activities v1.0.0  ·  Output: List

Searches for text in the PDF and returns the list of page numbers (starting from 1) where it appears. Useful for locating sections within long documents before extracting or manipulating those pages.

It scans the document looking for text and returns the numbers of the pages where it is found. By default not case sensitive.

ParameterEditorDescription
pathexpressionPDF file path.
textexpressionTexto a buscar.
ParameterEditorDescription
caseSensitivebooleanBe case sensitive. By default false.

Returns a List of page numbers (1-based). Empty if not found.

Find the page of an annex and extract it to a separate PDF:

PDF Search Text path = = ruta text = "ANEXO A" → output: paginas
If condition = = count(paginas) > 0
└─ then:
PDF Extract Pages path = = ruta pages = = toString(first(paginas)) output = "C:/anexoA.pdf"