Could not find executable pdftotext
benmordecai opened this issue · 3 comments
Describe the bug
On Windows 11 powershell installed with chocolaty, rga mysearchterm
in a folder of pdfs yields one error per document of the form:
D:\datasheets\Communication Interfaces\FA-ISOCON Serial RS232-RS485 Interface.pdf adapter: poppler
Error: during preprocessing
Caused by:
0: run_adapter(D:\datasheets\Communication Interfaces\FA-ISOCON Serial RS232-RS485 Interface.pdf)
1: adapting D:\datasheets\Communication Interfaces\FA-ISOCON Serial RS232-RS485 Interface.pdf via poppler failed
2: Could not find executable "pdftotext".
I have explicitly installed poppler with choco install poppler
and the installation was successful. Nevertheless the error remains.
It seems like rga cannot find poppler in its default installation location. Perhaps a problem with path variables but I do not know much about how Windows manages paths as I am primarily a Linux user.
Operating System and Version
Windows 11
Output of rga --version
ripgrep-all 0.10.6
Output of $Env:Path
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Rockwell Software\RSCommon\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\ProgramData\chocolatey\lib\mpv.install\tools;C:\Program Files\dotnet\;C:\Program Files (x86)\Common Files\Rockwell\;C:\Program Files (x86)\Rockwell Software\RSCommon;C:\Program Files (x86)\Common Files\Rockwell;C:\Program Files (x86)\Rockwell Software\;C:\Program Files\Common Files\Rockwell\FTLD\;C:\Program Files (x86)\Common Files\Rockwell\FTLD\;C:\Program Files (x86)\Common Files\Rockwell\FactoryTalk Linx\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files (x86)\Rockwell Software\RSView Enterprise\;C:\Users\ben mordecai\AppData\Local\Microsoft\WindowsApps
Exact same error, win 10, also installed by chocolately
I don't know how chocolately installs things, but the pdftotext binary must be in path for rga to work.