Author here, if you have any questions, feel free to ask them.
It really is amazing how hard it is just to retrieve the currently opened pdf file and its page number in a pdf viewer. Some pdf viewers (Like Zathura) provide this via DBus, but even very common ones like Evince don't. I managed to find a way using gvfs, although it's a bit of a hack.
For others (e.g. Mendeley), I have no idea on how to do this... Anybody have ideas? it is Qt based, maybe I can hook into that via some debugging tool?
The solution is emacs. I know you’ve got a lot invested in vim already. You can get instant LaTeX rendering with AUCTeX, view the pdf in emacs with pdf-tools, which can be used with something like org-ref (there are many bibliography packages) to query a db with the DOI of the pdf. (Try saying that two times fast). This EmacsConf talk should give you a taste of what I mean:
Your old post with instantly rendering latex snippets actually inspired me to start using vim/LaTeX. This opened up a whole new world for me. I started programming, got back into my engineering degree, started using emacs/org-mode and have nearly finished the degree. Thank you, from the bottom of my heart. I don’t know what I’d be doing if I hadn’t seen your post. It revealed a way of using computers that I had never seen before.
Try emacs and org-mode sometime. Configurability is off the charts and vi keybindings are easily configurable (and so are the snippets). I loved the workflow, I believe that a mind like yours will also find emacs elisp captivating and I would love to see what you could come up with in that much more flexible ecosystem (I am a former Vim evangelist)
What does org mode have to do with the problem where you have a document open in a PDF viewer and you want to retrieve the location of the document in the file system and what page is currently showing in the viewer's window?
If you're using Org-ref, and have used that to drill down into your
pdfs then you always have the document context (and bibtex etc
context) from within emacs. But I don't think that is the OPs use
case, so apologies for the noise. Also careful use of unix find with
pdfgrep can be handy.
On recent-ish versions of evince it is possible to do a bit more via dbus. For example, forward and reverse synctex search between evince and vim over dbus is done at [1]. I use this when I use evince, but I acknowledge that it has stupid flaws.
Having written this, I am actually completely incapable of retrieving the page number over dbus. (As you had mentioned). I'm a bit surprised that forward and reverse search can still be done.