1pdfgrep(1) USER COMMANDS pdfgrep(1)
2
3
4
6 pdfgrep - search pdf files for a regular expression
7
9 pdfgrep [OPTION...] PATTERN FILE...
10
12 Search for PATTERN in each FILE. PATTERN is an extended regular expres‐
13 sion.
14
15 pdfgrep works much like grep, with one distinction: It operates on
16 pages and not on lines.
17
19 -i, --ignore-case
20 Ignore case distinctions in both the PATTERN and the input
21 files.
22
23 -H, --with-filename
24 Print the file name for each match. This is the default setting
25 when there is more than one file to search.
26
27 -h, --no-filename
28 Suppress the prefixing of file name on output. This is the
29 default setting when there is only one file to search.
30
31 -n, --page-number
32 Prefix each match with the number of the page where it was
33 found.
34
35 -c, --count
36 Suppress normal output. Instead print the number of matches for
37 each input file. Note that unlike grep, multiple matches on the
38 same page will be counted individually.
39
40 -C, --context NUM
41 Print at most NUM characters of context around each match. The
42 exact number will vary, because pdfgrep tries to respect word
43 boundaries. If NUM is "line", the whole line will be printed. If
44 this option is not set, pdfgrep tries to print lines that are
45 not longer than the terminal width.
46
47 --color WHEN
48 Surround file names, page numbers and matched text with escape
49 sequences to display them in color on the terminal. (The default
50 setting is auto).
51
52 WHEN can be:
53
54 always Always use colors, even when stdout is not a terminal.
55
56 never Do not use colors.
57
58 auto Use colors only when stdout is a terminal.
59
60 -q, --quiet
61 Suppress all normal output to stdout. Errors will be printed and
62 the exit codes will be returned (see below).
63
64 --help Print a short summary of the options.
65
66 -V, --version
67 Show version information
68
70 The behavior of pdfgrep is affected by the following environment vari‐
71 able.
72
73 GREP_COLORS
74 Specifies the colors and other attributes used to highlight var‐
75 ious parts of the output. The syntax and values are like
76 GREP_COLORS of grep. See grep(1) for more details. Currently
77 only the capabilities mt, ms, mc, fn, ln and se are used by pdf‐
78 grep, where mt, ms and mc have the same effect on pdfgrep.
79
81 Normally, the exit status is 0 if at least one match is found, 1 if no
82 match is found and 2 if an error occurred. But if the --quiet or -q
83 option is used and a match was found, pdfgrep will return 0 regardless
84 of errors.
85
87 Hans-Peter Deifel <hpdeifel at gmx.de>
88
90 grep(1), regex(7)
91
92
93
94version 1.2 March 15, 2011 pdfgrep(1)