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

Unable to view PDF in a webview when a partition attribute is declared #27121

Open
Titaye opened this issue Dec 24, 2020 · 17 comments
Open

Unable to view PDF in a webview when a partition attribute is declared #27121

Titaye opened this issue Dec 24, 2020 · 17 comments

Comments

@Titaye
Copy link

Titaye commented Dec 24, 2020

Preflight Checklist

  • [ x] I have read the Contributing Guidelines for this project.
  • [ x] I agree to follow the Code of Conduct that this project adheres to.
  • [x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

I'm trying to display a pdf inside a webview which has its own partition. The PDF plugin is loading (visually I can see the gray PDF background), but no pdf content is displayed. I'm using this code

<webview plugins="true" partition="ramdomid" src="https://arxiv.org/ftp/arxiv/papers/1703/1703.09735.pdf"></webview>

When I'm using the same code without the partition attribute, everything is working.

  • Electron Version:
    • 11.1.1
  • Operating System:
    • Windows 10 2004
  • Last Known Working Electron version:
    • ?

Expected Behavior

I should be able to see the pdf content in a webview with a partition set

Actual Behavior

The webview is displaying the pdf plugin surface without the pdf content

To Reproduce

Working html code

<webview plugins="true" src="https://arxiv.org/ftp/arxiv/papers/1703/1703.09735.pdf"></webview>

Non working html code

<webview plugins="true" partition="ramdomid" src="https://arxiv.org/ftp/arxiv/papers/1703/1703.09735.pdf"></webview>

https://gist.github.com/c5ea00ef71c18729d002eacad75e49e4

Screenshots

image

@aleksey-hoffman
Copy link

Workaround

You can fix this by making partition persistent (add persist: before the partition name)

<webview 
  partition="persist:partitionName" 
  src="file:///C:/test.pdf"
></webview>
let window = new BrowserWindow({
  ...
  partition: "persist:partitionName"
})

@vladimiry
Copy link

vladimiry commented Jan 28, 2022

You can fix this by making partition persistent (add persist: before the partition name)

Not a fix but an ugly workaround. There are cases when persist:-prefixed partition is defined by design, ie in-memory/temporary web storage use case.

@vladimiry
Copy link

vladimiry commented Jan 28, 2022

@codebytere can you also add 15-x-y and platform/linux labels?

Btw, blob url created via URL.createObjectURL and applied to webview is also the case.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Oct 6, 2022
@codebytere codebytere removed the stale label Oct 6, 2022
@codebytere codebytere self-assigned this Oct 6, 2022
@snaildos
Copy link

snaildos commented Oct 9, 2022

Still not fixed.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@vladimiry
Copy link

Bump, v22.0.2.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Apr 22, 2023
@snaildos
Copy link

Still occurs on latest.

@github-actions github-actions bot removed the stale label Apr 23, 2023
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Jul 23, 2023
@snaildos
Copy link

No. Still not working on latest.

@github-actions github-actions bot removed the stale label Jul 24, 2023
@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@snaildos
Copy link

No. Still not working on latest.

@dominix
Copy link

dominix commented Dec 11, 2023

there are been tree years now this bug is revealed. I guess the project should focus on what happen, because it is an important feature lots of others project depend on. Thanks for you continuous support.

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@gpetrov
Copy link

gpetrov commented May 2, 2024

Bump

@dominix
Copy link

dominix commented May 2, 2024

bump as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants