I am trying to use Fitz to highlight text in a PDF document. I can highlight an individual word quite easily, but I am trying to highlight the whole paragraph that the word appeared in. Is this possible using fitz? I cannot find any information on it. Can anyone point me in a good direction?
Asked
Active
Viewed 82 times
0
-
Welcome to SO! Please read [ask] and share your attempt (e.g. where you "highlight an individual word") as [example]. – hc_dev Mar 06 '23 at 19:12
-
[I am one of the maintainers] **Yes** this is possible. Essentially you provide a start point and a stop point and use a specialized call pattern of `add_highlight_annot`. An example script is in this repo: https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/word%26line-marking. – Jorj McKie Mar 06 '23 at 19:36