When installed via `choco`: Fails to adapt and search PDFs on Windows: `Error: copying adapter output to stdout`; poppler `pdftotext` exit status `99`

Author: ElectricRCAircraftGuyCreated May 2, 2024Updated Apr 23, 2026
Labelsbug

Describe the bug

It fails to search any PDF.

Error it gives me:

Error: copying adapter output to stdout

Caused by:
    0: adapting C:\Users\gstaples\temp\dummy.pdf.txt.asciipagebreaks via postprocpagebreaks failed
    1: subprocess: Command { std: "pdftotext" "-" "-", kill_on_drop: false }
    2: ExitStatus(ExitStatus(99))

Example run and output in the Git Bash terminal:

gstaples@my-pc MINGW64 ~/temp
$ rga my dummy.pdf
dummy.pdf: preprocessor command failed: '"C:\\ProgramData\\chocolatey\\lib\\ripgrep-all\\tools\\ripgrep_all-v0.10.6-x86_64-pc-windows-msvc\\rga-preproc" "dummy.pdf"':
-------------------------------------------------------------------------------
C:\Users\gstaples\temp\dummy.pdf adapter: poppler
C:\Users\gstaples\temp\dummy.pdf.txt.asciipagebreaks adapter: postprocpagebreaks
pdftotext version 4.00
Copyright 1996-2017 Glyph & Cog, LLC
Usage: pdftotext [options] <PDF-file> [<text-file>]
  -f <int>             : first page to convert
  -l <int>             : last page to convert
  -layout              : maintain original physical layout
  -simple              : simple one-column page layout
  -table               : similar to -layout, but optimized for tables
  -lineprinter         : use strict fixed-pitch/height layout
  -raw                 : keep strings in content stream order
  -fixed <number>      : assume fixed-pitch (or tabular) text
  -linespacing <number>: fixed line spacing for LinePrinter mode
  -clip                : separate clipped text
  -nodiag              : discard diagonal text
  -enc <string>        : output text encoding name
  -eol <string>        : output end-of-line convention (unix, dos, or mac)
  -nopgbrk             : don't insert page breaks between pages
  -bom                 : insert a Unicode BOM at the start of the text file
  -opw <string>        : owner password (for encrypted files)
  -upw <string>        : user password (for encrypted files)
  -q                   : don't print any messages or errors
  -cfg <string>        : configuration file to use in place of .xpdfrc
  -v                   : print copyright and version info
  -h                   : print usage information
  -help                : print usage information
  --help               : print usage information
  -?                   : print usage information
Error: copying adapter output to stdout

Caused by:
    0: adapting C:\Users\gstaples\temp\dummy.pdf.txt.asciipagebreaks via postprocpagebreaks failed
    1: subprocess: Command { std: "pdftotext" "-" "-", kill_on_drop: false }
    2: ExitStatus(ExitStatus(99))
-------------------------------------------------------------------------------

Example run and output in Command Prompt:

C:\Users\gstaples\temp>rga my dummy.pdf
dummy.pdf: preprocessor command failed: '"C:\\ProgramData\\chocolatey\\lib\\ripgrep-all\\tools\\ripgrep_all-v0.10.6-x86_64-pc-windows-msvc\\rga-preproc" "dummy.pdf"':
-------------------------------------------------------------------------------
C:\Users\gstaples\temp\dummy.pdf adapter: poppler
C:\Users\gstaples\temp\dummy.pdf.txt.asciipagebreaks adapter: postprocpagebreaks
Error: copying adapter output to stdout

Caused by:
    0: adapting C:\Users\gstaples\temp\dummy.pdf.txt.asciipagebreaks via postprocpagebreaks failed
    1: subprocess: Command { std: "pdftotext" "-" "-", kill_on_drop: false }
    2: ExitStatus(ExitStatus(3221225781))
-------------------------------------------------------------------------------

To Reproduce

Note: if you don't have choco (Chocolatey) installed, you can first install it by running this as an admin in PowerShell:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Source: https://chocolatey.org/install

Next:

  1. Open a Git Bash terminal as admin, and install via choco:
    bash
    choco install ripgrep-all
    # choose the `A` option for "yes to all"
  2. Download the attached dummy.pdf file.
  3. Run rga my dummy.pdf to try to search dummy.pdf for the word "my".

If on Windows 10 Pro, you'll also need to install vc_redist.x64.exe, as the instructions say here: https://github.com/phiresky/ripgrep-all?tab=readme-ov-file#windows

If on Windows 11 Pro, you won't.

If on Windows 10 Pro running in the Command Prompt, you may see this error pop up:

image

pdftotext.exe - System Error

The code execution cannot proceed because freetype.dll was not found. Reinstalling the program may fix this problem.

OK

If on Windows 10 Pro running in the Git Bash terminal, you will not see this error.

Attach example file:

dummy.pdf

Run command:

rga my dummy.pdf

Output

See above.

Screenshots

If applicable, add screenshots to help explain your problem.

See above.

Operating System and Version

Tested in Windows 10 Pro and in Windows 11 Pro. Same result in both.

Output of rga --version

ripgrep-all 0.10.6