@nprofile1q... Which window manager are you using? IIRC, KDE supports what you are looking for. You can set file associations, a command line to open, print, and exit, and so on.
I'm not current on Linux window managers so this might be a stump the chump kind of question.