File size: 181 Bytes
e25f854
 
 
 
 
 
 
 
 
 
 
 
2e5646b
1
2
3
4
5
6
7
8
9
10
11
12
13
import fitz

def extract_text(file):

    doc = fitz.open(stream=file.read(), filetype="pdf")

    text = ""

    for page in doc:

        text += page.get_text()

    return text