Get data from unsaved pdf

Hi Guys I need to read an unsaved pdf and if the pdf contains a specific word i need to download it if not close it and redo the process for other pdf’s is this possible