Emano-Waldeck / pdf-reader

a PDF reader extension based on Mozilla's PDF.js library for Chromium-based browsers
https://webextension.org/listing/pdf-reader.html
29 stars 8 forks source link

Can't activate extension for embedded PDFs after uninstalling and reinstalling it #10

Open bhucker2 opened 2 years ago

bhucker2 commented 2 years ago

This extension looks great, because it restores the zoom buttons that have disappeared in Chrome for a PDF embedded in a web page. In my development environment, the extension works -- but only if I use an iframe tag instead of an embed tag. The web page displays the embedded PDF, which has a //localhost URL, with the PDF Reader toolbar.

In the production environment, though, the iframe tag doesn't work. The iframe returns a "localhost refused to connect" error. If I change the iframe tag to an embed tag, the PDF appears normally, but the PDF Reader toolbar disappears and I am left with the Chrome viewer, with no zoom buttons.

I have selected the PDF Reader option to "Support embedded PDFs.."

Is there a way to make PDF Reader work with an embed tag, or is there a way to get around the "localhost refused to connect" error with an iframe tag?