Horje
extract pdf with python Code Example
extract pdf with python
first :pip install PyPDF2
# importing required modules
import PyPDF2
 
# creating a pdf file object
pdfFileObj = open('example.pdf', 'rb')
 
# creating a pdf reader object
pdfReader = PyPDF2.PdfFileReader(pdfFileObj)
 
# printing number of pages in pdf file
print(pdfReader.numPages)
 
# creating a page object
pageObj = pdfReader.getPage(0)
 
# extracting text from page
print(pageObj.extractText())
 
# closing the pdf file object
pdfFileObj.close()




Python

Related
python writelignes Code Example python writelignes Code Example
fibonacci sequence in python 2.7 Code Example fibonacci sequence in python 2.7 Code Example
c   to python converter Code Example c to python converter Code Example
nlp generate parse tree in python Code Example nlp generate parse tree in python Code Example
huffepuf Code Example huffepuf Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7