Closed yyjj7788 closed 4 months ago
The disable-pdf-extension
flag is not supported with Chrome bootstrap.
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?
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?
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);
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
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):
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.