Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
GhostScript PDF to text stdout
# requires ghostscript to be installed first - on mac, install with `brew install ghostscript`
# -sDEVICE=txtwrite - text writer
# -sOutputFile=- - use stdout instead of a file
# -q - quiet - prevent writing normal messages to output
# -dNOPAUSE - disable prompt and pause at end of each page
# -dBATCH - indicates batch operation so exits at end of processing
gs -sDEVICE=txtwrite -sOutputFile=- -q -dNOPAUSE -dBATCH to-be-processed.pdf

This comment has been minimized.

Copy link
Owner Author

drmohundro commented Dec 16, 2017


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.