evince 551 B

1234567891011121314
  1. #!/bin/sh
  2. #BK nov 2007
  3. #it seems built-in to gtk and gnomeprint print-dialogs, if choose print-
  4. #preview, tries to run 'evince' -- which is a Gnome document viewer.
  5. #i looked at what gets passed into this 'evince' script when try to print-
  6. #preview from Leafpad:
  7. #--unlink-tempfile --preview --print-settings /tmp/settings5F8P1T.ini /tmp/previewQ2HM1T.pdf
  8. #...interesting, it's a pdf file. so, do this...
  9. ONLYFILENAMES="`echo -n "$*" | tr '\t' ' ' | tr -s ' ' | tr ' ' '\n' | grep -v '^-' | grep 'pdf$' | tr '\n' ' '`"
  10. exec epdfview $ONLYFILENAMES