Any way to control evince settings from the commandline

evincepdf

Is there any way to change / set evince settings either in a config file or from the command line when starting ?

I'm using inotifywait to display a PDF when it is copied to a specific file, and I want to be able to set zoom (fit to page), continuous scrolling off and dual (side-by-side mode).

I know that I can manually launch evince, set these values and save as default, but that only works if someone manually launches it first and does this right – I want to guarantee a certain display at launch time.

Best Answer

I don't think you can control those settings via cli options (I'd love to be proven wrong though...)
You could however set the zoom, dual mode etc via the file attributes1 before launching evince. You do that via gio set so e.g. if you run:

gio set myfile.pdf metadata::evince::continuous 0
gio set myfile.pdf metadata::evince::dual-page 1
gio set myfile.pdf metadata::evince::sizing_mode: fit-page

and then

evince myfile.pdf

it should open myfile.pdf in dual-mode, with continuous scrolling off and fit-to-page.


1: To see all the attributes run gio info myfile.pdf. Note this is rather new stuff - it replaces gvfs-info and respectively gvfs-set-attribute (which had similar syntax)

Related Question