Open file from terminal in "presentation" mode.

Asked by Keith David Bershatsky

I am enjoying qpdfview, but have been unable to locate any complete/working example of a bash or python script to open a PDF file from the terminal in "presentation" mode. Does anyone have a couple of working examples that he/she might be willing to share? E.g., (1) launch a new instance of qpdfview and open FILE.pdf in "presentation" mode; and, (2) use the existing instance of qpdfview and open FILE.pdf in "presentation" mode.

Question information

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

Hello,

I think the way to achieve that would be to control qpdfview via its D-Bus scripting interface. You can use a program like "qdbus" to explore the methods provided by the interface and the Launchpad questions here [1] and here [2] have some example Python code that interacts with a qpdfview instance. (You can probably achieve the same purely from shell scripts but I guess that would be more involved and less efficient because of re-establishing the D-Bus connection for each request.)

Regards,
Adam

[1] https://answers.launchpad.net/qpdfview/+question/404154

[2] https://answers.launchpad.net/qpdfview/+question/695206

Can you help with this problem?

Provide an answer of your own, or ask Keith David Bershatsky for more information if necessary.

To post a message you must log in.