Function: pdf-info-search-string
pdf-info-search-string is a natively compiled function defined in
pdf-info.el.
Signature
(pdf-info-search-string STRING &optional PAGES FILE-OR-BUFFER)
Documentation
Search for STRING in PAGES of document FILE-OR-BUFFER.
See pdf-info-normalize-page-range for valid PAGES formats.
This function returns a list of matches. Each item is an alist
containing keys PAGE, TEXT and EDGES, where PAGE and TEXT are the
matched page resp. line. EDGES is a list containing a single
edges element (LEFT TOP RIGHT BOTTOM). This is for consistency
with pdf-info-search-regexp, which may return matches with
multiple edges.
The TEXT contains match face properties on the matched parts.
Search is case-insensitive, unless case-fold-search is nil and
searching case-sensitive is supported by the server.
Source Code
;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-info.el
(defun pdf-info-search-string (string &optional pages file-or-buffer)
"Search for STRING in PAGES of document FILE-OR-BUFFER.
See `pdf-info-normalize-page-range' for valid PAGES formats.
This function returns a list of matches. Each item is an alist
containing keys PAGE, TEXT and EDGES, where PAGE and TEXT are the
matched page resp. line. EDGES is a list containing a single
edges element \(LEFT TOP RIGHT BOTTOM\). This is for consistency
with `pdf-info-search-regexp', which may return matches with
multiple edges.
The TEXT contains `match' face properties on the matched parts.
Search is case-insensitive, unless `case-fold-search' is nil and
searching case-sensitive is supported by the server."
(let ((pages (pdf-info-normalize-page-range pages)))
(pdf-info-query
'search-string
(pdf-info--normalize-file-or-buffer file-or-buffer)
(car pages)
(cdr pages)
string
(if case-fold-search 1 0))))