read-aloud
read-aloud copied to clipboard
Feature Request: Read externally hosted PDFs by URL instead of upload (Firefox)
For the PDF viewer, it would be nice if we could enter a URL for a non-local PDF. For example, if I want to read https://docs.house.gov/billsthisweek/20240429/HR%204866%20-Garcia.pdf, I have to
- have my tab redirected to the lsd reader page
- go back a page to get back to the PDF
- download the PDF
- go back to the lsd reader
- upload the PDF there.
(Cryptically, some pages, like https://arxiv.org/pdf/1910.11099, give a "missing host permissions for the tab" error and don't redirect to the lsd reader at all, but I'd assume this falls under the same thing.)
It would be faster if there was a way to just enter the URL of the PDF page on the lsd reader page (or if the additional permissions are enabled, grab the URL automatically before the redirect).
Have you tried simply clicking on the Read Aloud icon when you're at the URL https://docs.house.gov/billsthisweek/20240429/HR%204866%20-Garcia.pdf ? It should work without your having to go through the steps above. I just tried and it seems to work fine.
Have you tried simply clicking on the Read Aloud icon when you're at the URL https://docs.house.gov/billsthisweek/20240429/HR%204866%20-Garcia.pdf ? It should work without your having to go through the steps above. I just tried and it seems to work fine.
Yes I tried that first; it does not work for me.
I am on the latest version of Firefox; clicking the Read Aloud icon takes me to the pdf upload page instead of reading aloud the page.
@ken107 were you able to reproduce the error for the ArXiv link I mentioned above? Here it is again if you missed it: https://arxiv.org/pdf/1910.11099
Ah, thanks for clarifying. I remember now. On Firefox, security prevents us from injecting code into the built-in PDF viewer page to load our own PDF viewer on top (the way we make it work on Chromium browsers). So we fall back to redirecting the user to the standalone viewer. The standalone viewer cannot open externally hosted PDF files from other websites due to cross-origin restrictions, hence the unfortunate steps you have to go through to make it work.
But thinking about it now, there may be a convoluted way to solve this. The extension reads the PDF file in the background, create a blob URL from it, and hands it down to the standalone viewer. The extension, if required, will need to request origin-permission to be able to read the PDF file.