def pdf_converter_PYPDF(self,path): import PyPDF2 pdfFileObj = open(path, 'rb') pdfReader = PyPDF2.PdfFileReader(pdfFileObj) author=PyPDF2.DocumentInformation().author # print(pdfReader.numPages) self.str=list() for i in pdfReader.numPages: pageObj = pdfReader.getPage(i) str_temp=pageObj.extractText() self.str=self.str+str_temp print(self.str) pdfFileObj.close()