I'm checking references of a paper and want to find the positions in the body where some paper (in the references list) is referenced. Is there a PDF editor which supports search via bash and extract the context of a position? I've tried to convert PDF to text, but didn't have a good result.
Just to add to the above answer, in particular you can use a command line tool from xpdf-utils called pdftotext and then search the text document created by this tool with grep.
This might look something like this:
There is more information in the manual. The only drawback to pdftotext is that you can't us globbing to transform multiple files at the same time. This problem can be overcome with a small bash script:
If you are having problems creating a text document from a pdf due to, for example, an incompatible pdf file, then that is another problem.
I think in general, pdf editors don't include command lines because they are graphical. If you want to use bash, (or maybe zsh!) then you might have to use a terminal shell.
To search for a regular expression in multiple pdf files using pdfgrep:
where path is location for your pdf files.
You can use xpdf-utils. xpdf is a suite of tools for Portable Document Format (PDF) files.
To install it you can use the Ubuntu Software Center, or by clicking below:
1Source:Ubuntu Apps Directory