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

PDF Viewer plugin is not loaded in object or embed tag #11065

Open
csaunier opened this issue Nov 8, 2017 · 8 comments

Comments

Projects
None yet
7 participants
@csaunier
Copy link

commented Nov 8, 2017

Hello team and users :)

I've got an issue when viewing a pdf. Seems the plugin is not working.

Here are some information :

  • Electron version: 1.7.9
  • Operating system: linux and mac

Expected behavior

I can view a pdf

Actual behavior

I get an error "can not load the plugin"

electron_without_pdf_plugin

How to reproduce

I made a simple repo based on the electron-quick-start : https://github.com/csaunier/electron-quick-start
I only add webPreferences: { plugins: true } into the config of the BrowserWindow, and a pdf into an object tag

I'm pretty sur i've seen it working in another real project i'm working on, but obviously, not anymore :)

I've seen some discussion about pdf, like this one #10793, but not sur if linked or not.

@welcome

This comment has been minimized.

Copy link

commented Nov 8, 2017

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@ahmedmohamedali

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2017

Hi @csaunier,
The PR #10793 fixes the issue for PDF loaded in iframes.
PFDs in Object and embed tags need to be fixed in a different PR.
Could you please make the title of this issue more specific as "PDF Viewer plugin is not loaded in object or embed tag". Thanks.

@csaunier csaunier changed the title Pdf viewer plugin is not loaded PDF Viewer plugin is not loaded in object or embed tag Nov 20, 2017

@csaunier

This comment has been minimized.

Copy link
Author

commented Nov 20, 2017

Hop, done @ahmedmohamedali

@coderzquest

This comment has been minimized.

Copy link

commented Feb 22, 2018

Any update on this issue...I'm facing the same issue on electron version 1.8.2

@euangordon

This comment has been minimized.

Copy link

commented May 4, 2018

Any update on this? I am facing the same on election version 2.0.0

image

@justintgav

This comment has been minimized.

Copy link

commented Jun 5, 2018

Seeing the same on electron v 2.0.2; Windows 10:
Demo shown with the barebones electron-quick-start with the embed tag added. I'd be happy to share a full example, but the screenshot should cut it (contains the bit of code modified).
https://i.imgur.com/GgEKMzX.png

This is a library-breaking issue for us; need embed support to wrap [legacy] webapp in electron.

Any insight @ahmedmohamedali ? Even a direction to explore might lead us to a potential workaround.

Thank you!

@ahmedmohamedali

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2018

@justintgav,

There is an issue in electron/chromium with embed/object tag when the type is "application/pdf".
I found that object tag and "text/html" type works fine in electron.
So you can use it as a workaround
<object type="text/html" data="http://www.pdf995.com/samples/pdf.pdf" width="700" height="500">

@justintgav

This comment has been minimized.

Copy link

commented Jun 8, 2018

@ahmedmohamedali excellent, thank you for the information. To clarify: we're waiting on the chromium project to fix the issue [before it can be propagated to electron]?
Thanks again

@sofianguy sofianguy added the 2-0-x label Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.