Changing order of preference of PDF viewers

Using gv should be a fallback.
Support for pdftotext as a console only PDF viewer

To force console viewing just unset DISPLAY, e.g.:

    $ DISPLAY= xpdf-compat.sh some.pdf

By default output of texttopdf passed to pager. To disable this just redirect
stadard output to a file or pipe it to a different program, because pager is
not invoked if the standard output is not a TTY. This way you can pipe it to
other commands like fmt:

    $ DISPLAY= xpdf-compat.sh some.pdf | fmt | less