Created attachment 7227 [details] Patch to allow external commands The attached patch adds a new keystroke, "!", to mupdf version 0.7 to run external commands. The first external command is defined in the environment variable "MUPDF_EXTERNAL". By giving the keystroke a numeric prefix, additional external commands may be used. For instance "3!" would run the command defined in environment variable "MUPDF_EXTERNAL3". As an example of use, you could set "MUPDF_EXTERNAL=lpr" and "MUPDF_EXTERNAL1="pdfdraw". Then, "!" would print the currently loaded file, and "1!" would export its pages as images. Hope this is helpful, Daniel Wagenaar -- Daniel Wagenaar California Institute of Technology 1200 E. California Blvd. 216-76 Pasadena CA 91125 daw@caltech.edu (626) 395-2577
this patch's addition of app->filename is similar to my own but i've got a lot more changes and it's a bit less well written i'll submit my changes in another bug. that is bug #691965 the main issue is that you need to turn the filename into absolute path via realpath as when mupdf is called like mupdf somename.pdf which i commonly do if i'm opening from the command line (although i do prefix it with 'detach' or as i have it aliased 'd') the filename will not be absolute
*** This bug has been marked as a duplicate of bug 691330 ***