Skip to content
Bruce D'Arcus edited this page Dec 9, 2021 · 22 revisions

pdf-tools integration

Search contents of PDFs

If you run this and select candidates, this will pass the list of any associated PDF files to pdf-tools to search across all of them.

(defun ex/citar-search-pdf-contents ()
  ;; from localauthor
  "Search pdfs."
  (interactive)
  (let* ((refs (citar-select-refs))         
         (files (citar-file--files-for-multiple-entries refs citar-library-paths '("pdf")))
         (string (read-string "Search string: ")))
    (pdf-occur-search files string t)))
Clone this wiki locally