Create test_PDFparser.py
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
import pymupdf
|
||||||
|
|
||||||
|
def extrahiere_text_als_string(pdf_datei):
|
||||||
|
doc = pymupdf.open(pdf_datei)
|
||||||
|
a = ""
|
||||||
|
for page in doc:
|
||||||
|
a += page.get_text()
|
||||||
|
return a
|
||||||
|
|
||||||
|
pdf_datei = 'InformatikModulhandbuch.pdf'
|
||||||
|
a = extrahiere_text_als_string(pdf_datei)
|
||||||
|
|
||||||
|
print(a)
|
||||||
Reference in New Issue
Block a user