How can I start qpdfview, from commandline, into presentation mode?

Asked by dmeinert

Running presentation on one X-Display
Control from a different [program from another X-Display
each time I send a new file#page to qpdfview it switches back to standard display mode
this is quite annoying during presentations since it forces me to permanently swicth betwenn the different displays

Question information

Language:
English Edit question
Status:
Solved
For:
qpdfview Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Reichold
Solved:
Last query:
Last reply:
Revision history for this message
Best Adam Reichold (adamreichold) said :
#1

Hello,

I don't think the command-line interface will currently allow you to do that. I also think that adding a presentation mode switch or something like this is not the best approach to this. I guess it would be easiest to use a scripting language like Python to directly call into qpdfview's D-Bus interface. This is basically what the command-line code does, but it of course does more than just open the document as it will also change the current tab and raise and activate qpdfview's main window, but these things could then be left out. This would also open many more possibilities for remote control of your presentations, even though it might be necessary to further extend the D-Bus interface...

Best regards, Adam.

Revision history for this message
dmeinert (dmeinert) said :
#2

Thank you, Adam,
apparently this hasn't been done before, at least google didn't find an answer or me.

I currently found a workaround, by running the remote qpdfview in full-screen and removing all toolbars and auxiliary windows.
this only leaves the head tools, which is acceptable when comparing to windows environments.

Regards
-Dieter

Revision history for this message
Adam Reichold (adamreichold) said :
#3

Hello,

just for completeness and future reference, following the dbus-python tutorial at [1], the following Python script will open a file given as a command line argument in qpdfview without raising qpdfview's window:

echo >jtpooint.py <<EOF
#!/usr/bin/env python2

import sys
import dbus

from os.path import abspath

if len(sys.argv) != 2:
    print 'usage: %s file_name' % sys.argv[0]

file_path = abspath(sys.argv[1])

bus = dbus.SessionBus()
proxy = bus.get_object('local.qpdfview', '/MainWindow')
iface = dbus.Interface(proxy, 'local.qpdfview.MainWindow')

iface.jumpToPageOrOpenInNewTab(file_path)

EOF

Revision history for this message
Adam Reichold (adamreichold) said :
#4