PDF

Download 16
Last updated Oct 28, 2026

pdf-search

Searches the text of a PDF in the file store or at an http(s) url with a regular expression, one row per match.

pdf-search url=VALUE regex=VALUE [ignore-case=VALUE] [range=VALUE] [context=VALUE] [password=VALUE] [insecure=VALUE]
url=VALUE
Required. File store url or http(s) url of the PDF, e.g. sonar://{file_guid}, https://example.com/a.pdf. An http(s) PDF is downloaded to a temp file, which is deleted when the command finishes.
regex=VALUE
Required. Java regular expression. The quoted option value consumes one level of backslash escaping, so double every backslash: \d{1,3}, \. — a single \d silently becomes the literal d. e.g. (?i)error|failure
ignore-case=VALUE
Optional. t to match case-insensitively
range=VALUE
Optional. Page selection, e.g. "1-5,7" (1-based). Every page when omitted.
context=VALUE
Optional. Chars of surrounding text on each side of a match (default: 80)
password=VALUE
Optional. Password of an encrypted PDF. Tries the empty password when omitted.
insecure=VALUE
Optional. t to skip TLS certificate and hostname verification for an https url. Default is f.

Output Fields

FieldTypeNameDescription
pageIntegerPagee.g. 3 - 1-based page number of the match
matchStringMatche.g. ERROR - the matched text itself
contextStringContexte.g. …request failed with ERROR 500 at 10:23… - the match with surrounding text
match_indexLongMatch indexe.g. 1 - 1-based position across the whole document