I want to write a function that jumps to a given string in a pdf document. I am using pdf-tools
. Naively, I thought this would work:
(defun goto-string-in-pdf (pdffile)
"Jump to string 999 in pdffile"
(let ((win (get-buffer-window pdffile)))
(with-selected-window win
(pdf-view-goto-page 1)
(search-forward "999"))))
But it seems search-forward
doesn't work in PDFView-mode. So how do I make this work?