http://www.free-ocr.com/, or, I guess any OCR tool will do a job. But then - people could always have done (and probably did) that with a physical book, so, I'm not sure whether it would be worth it to make it more difficult to do with the digital book.
Well if someone created the software to do it, you could rip digital books automatically - not quite as easy to do with paper books, what with having to scan all the pages (possibly after first unbinding the book).