I am trying to write some code to extract text from pdf and followed the directions on pypi to install pdf2image and poppler on windows. I also changed Path. Well, the suggested command on python does not work, it keeps producing the following error:
== RESTART: C:\Users\Elisabeth\AppData\Local\Programs\Python\Python39\test.py ==
Traceback (most recent call last):
File "C:\Users\Elisabeth\AppData\Local\Programs\Python\Python39\lib\site-packages\pdf2image\pdf2image.py", line 441, in pdfinfo_from_path
proc = Popen(command, env=env, stdout=PIPE, stderr=PIPE)
File "C:\Users\Elisabeth\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Elisabeth\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
The code I used:
from pdf2image import convert_from_path
from pdf2image.exceptions import (
PDFInfoNotInstalledError,
PDFPageCountError,
PDFSyntaxError
)
images = convert_from_path(r'C:\Users\Elisabeth\Documents\Anleitungen\C:/Users/Elisabeth/Documents/Anleitungen/t490s_x390_ug_de.pdf')
What I did to solve the problem, but did not work: uninstalling poppler and pdf2path and installing it again. I also used different versions of poppler.
I am just stuck, is there the possibility for some help?
Thank`s
Elaisa