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

cefsharp 126.2.7 disable-pdf-extension Invalid cefsharp 125.0.210 disable-pdf-extension normal #3739

Closed
yyjj7788 opened this issue Jul 15, 2024 · 4 comments
Labels
bug Bug report

Comments

@yyjj7788
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen and what happened instead.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: [e.g. Windows 10, MacOS 13.2, Ubuntu 22.10]
  • CEF Version: [e.g. 111.2.2]

Additional context
Does the problem reproduce with the cefclient or cefsimple sample application at the same version?

Does the problem reproduce with Google Chrome at the same version?

Add any other context about the problem here.

@yyjj7788 yyjj7788 added the bug Bug report label Jul 15, 2024
@magreenblatt
Copy link
Collaborator

The disable-pdf-extension flag is not supported with Chrome bootstrap.

@chriscurtismozenda
Copy link

Thank you for confirming @magreenblatt. Are there any plans to implement this behavior in the future for the Chrome bootstrap? Any suitable workarounds when using the Chrome bootstrap that you are aware of?

@chriscurtismozenda
Copy link

Looks like this setting is what is needed in Chrome:
chrome://settings/content/pdfDocuments

If this is set to "Download PDFs" then the viewer is not invoked in a similar way and the PDFs go through the download manager. Is there a way to set this programmatically in CEF?

@chriscurtismozenda
Copy link

chriscurtismozenda commented Jul 25, 2024

Looks like I was able to change this behavior with the following preference:

CfxValue pdfValue = CfxValue.Create();

pdfValue.SetBool(true);

bool success = this.Browser.Host.RequestContext.SetPreference("plugins.always_open_pdf_externally", pdfValue, out error);

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

No branches or pull requests

3 participants