Plugin API: Open a PDF by its path which might enable full-text search across PDFs

This is a FR about plugin API that one could use to open PDFs.

I am developing a plugin that improves my PDF workflow in Logseq. I find full-text search across PDFs can integrate seemlessly with Logseq if there’s a way to open PDFs from plugins.
See my discussion here . For your convenience I paste part of the content here below.


Why full-text search and How

A great feature of Logseq is that we can cite specific PDF annotation anywhere we want. But one could make better use of it if combined with full-text search.

To achieve that, one needs tools like GitHub - alraban/org-recoll: A lightweight emacs org-mode wrapper for the recoll full-text search engine , a PDF full-text search plugin for emacs using recoll. Fortunately, since recoll provides api for searching, we can use recoll in Logseq as a web server running locally. It sounds good but still we have few problems

Open A PDF by Its Path

Till now, I tried to acquire the Logseq’s PDFjs viewer as done in OverflowCat/logseq-pdf-nav, and use PDFjs to load the PDF by path. Due to reasons I don’t know, it doesn’t open PDF as expected. Also, it might cause problems if we skip some key steps required by PDF highlights. So the correct way is to perform sth like open-button@logseq/…/zotero.clsj.

Please share if you have any ideas! Thanks.