Linux.com

Re:grep pdf documents?

Posted by: jamesonburt on June 21, 2004 09:34 PM
pdftotext -layout 02a0214.pdf - |egrep hamburger --context=4 --color=always

Derived from another's comment, this works reasonably well, colorizing the matching text "hamburger".
This gives a context of 4 lines above and 4 lines below, needed since pdftotext cannot look exactly like pdf.

#

Return to Putting together PDF files