def getPDFContent(path):
    content = ''
num_pages = 10
p = file(path, 'rb')
pdf = pyPdf.PdfFileReader(p)
for i in range(0, num_pages):
    content += pdf.getPage(i).extractText() + '\n'
content = ' '.join(content.replace('\xa0', ' ').strip().split())
return content
How to read line by line in pdf file using PyPdf?