I've posted a number of times in various threads about the Xpdf command-line tools – particularly about the
Look for the “x86, Mac” version in the “Precompiled binaries” section.
The the utilities contained in the Xpdf downloadable binary are:
pdfdetach pdffonts pdfimages pdfinfo pdftohtml pdftopng pdftoppm pdftops pdftotext
This macro uses the
pdftotext tool to convert PDF files in the Front Finder Window to Text files.
The macro is non-destructive – all text files are saved alongside their original PDF in the source directory.
It is possible to route the converted text to STDOUT instead of to a file:
pdftotext -layout <POSIX_Path_of_Your_File> -
The trailing hyphen is ESSENTIAL.
I've done the heavy-lifting in the shell, but it is easy enough to iterate through the file list with a Keyboard Maestro For Each PathVar in a Directory action and apply the basic shell command to