takes in a PDF document and returns the text from within it and additional information about the doc