#!/bin/bash

find . -type f -name '*.pdf' -print0 |
  while IFS= read -r -d '' file
    do pdfimages -j "${file}" "${file}"
  done
