Get text from the document and preview the results