Closed jelmervdl closed 2 years ago
I think this is impossible for now. Firefox does not allow addons to run on the PDF viewer page, so we would need to ship our own copy of pdf.js. (Edit: note that Firefox' embedded version also has some special integration, like the find-in-page functionality)
pdf.js does have access to text, but not really to the flow of text. It draws the text based on position and 0 opacity to allow copy/pasting. Technically those texts could be rendered visibly to show a translated version of the document.
Wild idea: can I hook into pdf.js (is Firefox still using that?) and do in-pdf translation? That would be pretty unique.