Linux command line highlight specific words in an existing pdf file

Hi.

Is there a way to highlight in an existing PDF file specific words from the command line? Highlight I mean make those words with yellow highlight background.

I like to highlight words like “research, cancer, medicine” in a pdf file
for easier reading - need to do this from the command line in Ubuntu.

Thanks,

As this is a forum for LibreOffice and you tagged Base (= database component ) the first answer is simply: No way.
.
As your complete question is not related to LibreOffice anyway: Sure you can program something like this, but if you’d know of the internals of pdf you’d avoid this.
.
You may try Software like docfetcher, wich may index your documents and can show searched places highlighted. But it does not change the original file.

I wouldn’t use LO to view PDFs, it really struggles with large files.

Alternatives can be found here: Search and highlight specific text within pdf using excel vba - Stack Overflow

In short, from linux you can launch firefox with the file url and end it with the search parameters like so,

firefox file:///some/dir/somefile.pdf#search="word1 word2 word3"

It should open the file and highlight all terms.

HTH