I want to automate the reading progress over my large pile of PDFs. I need the ability to let my other programs know where I read the last page when close the PDF. Okular can remember the lasted opened position (i think?), but I want to have a bird-overview of my reading progress on all my PDFs. If I can the last page of reading from `stdout` when I exit Okular, I can automatically put that value into my databases. What if, let's say `Okular --log nice.pdf`, then I can open okular via a script then send the value to database. Scripting a GUI application! I might be the only want this :/ Probably this should be made as a standalone application. Does Okualr can be used as a KPart?
No, this shouldn't be a standalone application. If you already have an existing solution for bibliography management, like Zotero, you don't want to duplicate the functionality.
(In reply to shenlebantongying from comment #0) > Okular can remember the lasted opened position (i think?), Yes, not only the last position. Okular stores the viewport history in XML files, usually under ~/.local/share/okular/docdata/. It should be possible to parse these, although not very convenient. > Scripting a GUI application! > > I might be the only want this :/ No, this is one use case for D-Bus. You can try the application d-feet to look which D-Bus methods are available in Okular. For example, you can query the currentPage() method. Of course, you need to query it before Okular is closed. > Does Okualr can be used as a KPart? Yes, the okularpart component, which is used by the “Okular” desktop application, is actually a KPart in a shared library. It provides the same currentPage() method.
Sorry, but you're asking for something super strange, I see no reason at all why we would add such an option to Okular.