Yes, but not all documents are trivial to convert to a text file because the layout can be quite complex. A PDF file can have little bits of text floating anywhere and when you search inside the file, you can see it highlighted at its actual position.