In Pyhton Code to Get Text Data From Pdf You need to in install the folowing python librery for data read form the pdf document.


This librery will help you to download data file or pdf from the internet.

To install urllib command

pip install urllib

pip install urllib2

pip install urllib3

import urllib

urllib.urlretrieve('', 'data.pdf')


This library will help you to read the pdf and extract data

import PyPDF2
pdfFileObj = open('data.pdf', 'rb')
pdfReader = PyPDF2.PdfFileReader(pdfFileObj)
print pdfReader.numPages
pageObj = pdfReader.getPage(0)
print pageObj.extractText()




Leave a Reply

Your email address will not be published. Required fields are marked *