Is there a way to search pdf files using the power of grep, without converting to text first in Ubuntu?
|
|
If you have
This won't create a .txt file. |
|||||||||||||||||
|
|
Install the package
|
|||
|
|
|
You could pipe it through
|
|||||||||||||||
|
|
No. A pdf consists of chunks of data, some of them text, some of them pictures and some of them really magical fancy XYZ (eg. .u3d files). Those chunks are most of the times compressed (eg. flat, check http://www.verypdf.com/pdfinfoeditor/compression.htm). In order to 'grep' a .pdf you have to reverse the compression aka extract the text. You can do that either per file with tools such as But no, you can not |
|||
|
|
|
Recoll can search PDFs. It doesn't support regular expressions, but it has lots of other search options, so it might fit your needs. |
||||
|
|
|
try this
for printing the lines the pattern occurs inside the pdf |
||||
|
|
|
gpdf might be what you need if you're using Gnome! Check this in case you're not using Gnome. It's got a list of CLI pdf viewers. Then you can use Hope that helps. |
|||
|
|
