I am reading pdf files and trying to extract keywords from them through NLP techniques.Right now the program accepts one pdf at a time. I have a folder say in D drive named 'pdf_docs'. The folder contains many pdf documents. My goal is to read each pdf file one by one from the folder. How can I do that in python. The code so far working successfully is like below.
import PyPDF2
file = open('abc.pdf','rb')
fileReader = PyPDF2.PdfFileReader(file)
count = 0
while count < 3:
pageObj = fileReader.getPage(count)
count +=1
text = pageObj.extractText()