Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't preview PDFs #785

Closed
hacdias opened this issue Jan 7, 2019 · 8 comments
Closed

Can't preview PDFs #785

hacdias opened this issue Jan 7, 2019 · 8 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature P3 Low: Not priority right now

Comments

@hacdias
Copy link
Member

hacdias commented Jan 7, 2019

It seems that we can't preview PDFs inside Web UI on IPFS Desktop.

  1. I tried activating the plugins option on Browser Window. That would also require changing object to embed on the PDF. I changed to embed and all I got was 'Couldn't load the plugin'.
  2. Also tried https://github.com/gerhardberger/electron-pdf-window but it seems that it is used so a Window can load a PDF URL and not to embed PDFs.

Needs more research.

@hacdias hacdias added the kind/bug A bug in existing code (including security flaws) label Jan 7, 2019
@lidel
Copy link
Member

lidel commented Mar 2, 2019

We probably should avoid running plugins for security reasons.
Instead, a safer approach could be https://mozilla.github.io/pdf.js/

@hacdias
Copy link
Member Author

hacdias commented Mar 2, 2019

@lidel do you think this should go into Web UI or just IPFS Desktop?

@lidel
Copy link
Member

lidel commented Mar 3, 2019

I believe preview logic should stay in Web UI.
In this case, PDF preview could get smarter: somehow check if there is native/plugin support for PDF in the browser, if not, lazy-load and run pdf.js, so the preview always works.

@olizilla do you feel the same?

@hacdias
Copy link
Member Author

hacdias commented Mar 4, 2019

I agree with you! Let's wait for Oli's word.

@hacdias
Copy link
Member Author

hacdias commented Mar 7, 2019

Ping @olizilla

@olizilla
Copy link
Member

@hacdias can we just use an iframe for pdf previews?

@hacdias
Copy link
Member Author

hacdias commented Apr 19, 2019

@olizilla yes, but that would need us to rely on Electron's PDF viewer through plugins. It doesn't work though. It's an issue since 3.0.0 that hasn't been fixed yet: electron/electron#12337 😞

@hacdias hacdias assigned hacdias and unassigned hacdias Apr 28, 2019
@hacdias hacdias added P2 Medium: Good to have, but can wait until someone steps up P4 - Very Low kind/enhancement A net-new feature or improvement to an existing feature and removed P2 Medium: Good to have, but can wait until someone steps up kind/bug A bug in existing code (including security flaws) labels Jul 24, 2019
@jessicaschilling jessicaschilling added P3 Low: Not priority right now and removed P4 - Very Low labels Mar 30, 2020
@lidel
Copy link
Member

lidel commented Oct 12, 2020

This got fixed in v0.13.x where we switched to Electron 9.x which has a backported fix for electron/electron#12337

@lidel lidel closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature P3 Low: Not priority right now
Projects
None yet
Development

No branches or pull requests

4 participants