How can I make my Firefox Quantum extension to access a PDF viewed with FQ?

As title says. I don’t know how this kind of thing is possible and I am really curious to explore the available options.

I don’t think there’s an API available to access loaded PDF documents, since WebExtension APIs are mostly designed to enhance web content rather than other formats.