Embedded PDF Issue in Edge Browser - google-chrome

When using the Microsoft Edge browser, by default when you open a PDF it will open the PDF in a new tab using the built-in PDF viewer. To avoid this, you can adjust the browser's settings: Toggle on the "Always open PDF files externally" option. This works great. However, it presents a separate issue. Our internal applications use embedded PDFs in iframes. When the external toggle is set to on, these PDFs will not show in the iframes. This doesn't happen in Chrome. Has anyone else experienced this and know a work around?
I've tried removing the type="application/pdf" from the iframe tag to no avail. I can't find anything else online.

It looks like an expected result because you have enabled the option Always open PDF files externally.
So MS Edge browser is giving you an option to download the PDF file and open it using the desired app.
You said this doesn't happen in Chrome browser.
If you enabled the Download PDF files instead of automatically opening them in Chrome option then you will notice the same result in the Chrome browser.
Output in the Chrome browser:
If you click on the Open button then it will download the PDF file.
I did not get any solution or a workaround for this issue.
If you think that there should be an option to load the file in an iframe if Always open PDF files externally option is enabled then I suggest you click on the Send Feedback button in the MS Edge browser and try to provide your feedback about it to the Microsoft.

I posted feedback suggesting that an exclusion/inclusion list be in included but the simplest way would be to treat the frame as part of the session. But this is not Microsoft it is the Chrome projects issue.

Related

Edge Chromium xlsm issue

On a web application we manage, there is an issue only present in Edge Chromium. There is a button to download a file: an Excel macro file. When clicking the button in Edge, the file is opened in Excel. However, the login page of the webapplication appears in the XLSM file in Excel, instead of opening the xlsm file itself. In Google Chrome, the file is not opened, but downloaded first and when clicking open, we get the wanted behaviour.
This is the code behind the button (confidential data replaced by XXX):
<input type="submit" onclick="redirectToNavUrlGA('https://XXX.xlsm','XXX','XXX','XXXXXX'); return false;" value="XXXXXX">
When calling the URL directly in a cache cleared-Edge browser, the login page appears in browser and the file is downloaded correctly. Only when you are already logged in the to application, the issue is present. But users will always be logged in already, so not a good workaround.
The URL is using reverse proxy to point to a Sharepoint 2010 site to download the file. I've read some issues with Edge Chromium and SP 2010, is this maybe the cause of the issue?
Do you have any other ideas that could be causing this issue?
Thanks in advance.
According to your description, I think the main problem is the compatibility issue between SharePoint 2010 and Edge. The Edge browser is not included in SharePoint 2010 browser support, and even Edge IE 11 mode is not supported. So I suggest that you can use a supported browser.

How to load a PDF file embeded in an iFrame on electron browser

We have an app which launches Electron browser. In the Electron browser we load a third party website which has a link.
When we view this site in the Chrome or IE browsers, clicking on this link it renders a PDF in an iFrame but for electron browser it shows a save file dialogue. We want to display this PDF in the electron browser just the same way it works for Chrome and IE. As it is a third party website we don't have control over rendering or loading PDF file or we are not getting any events related with loading of this PDF.
For this scenario, if there is no way to display PDF in electron then it is OK to block it so the Save file dialogue will not show.(This app is actually in the KIOSK so we don't want to save a file if it doesn't render in browser.)
Thanks in advance for your comments!
Here is a discussion on an issue almost identical to yours. The answer does a decent job explaining why the download option is appearing. As for preventing the pdf from being downloaded, try using the <embed> tag as it detects compatibility. So embed the pdf using that tag and then load the html into the <iframe>. Here is some example code and description of how to set that up.

OneNote to open link in Chrome without Chrome being default

I have a very simple question I could not find answer for myself: I want links in OneNote to open in Chrome.
Note that the default browser is IE and I cannot change it (not admin etc).
Tried: "chrome_path url" - didn't work. Everything I could think about didn't work.
Please provide explicit solution so that link from within OneNote opens in Chrome rather than in IE.
To note, there are multiple links, so batch file won't do in this case.
Thank you in advance!
I had a little go with testing some ideas that I had though I'm very new to OneNote. It's easy enough to open Chrome from a hyperlink:
Select text to link
Add link
Select the file icon and navigate to chrome.exe. In my instance - C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
I believe you cannot pass arguments to the exe as it is considered a security issue. This certainly used to be the case and I'm not sure if they have modified their thinking since. The only way I can think of is to create a batch file which includes your ideal website and link to the batch file:
"start chrome http://www.youtube.com"
I found two ways to do it, though neither is the perfect:
There is a 3rd party OneNote add-on which adds more browsers in the right-click menu. Though it is not free and maybe can't be installed on restricted computers.
It works only on OneNote docs which are saved onto Onedrive. Open the OneNote page which has the links right in the Chrome, not in the desktop app. Then any links you click will open in the same browser. You can get the address of the OneNote page by clicking on 'Copy Link to Page' in OneNote app, then paste it to a notepad. Copy the first url to Chrome's address bar.
For those who has admin right, this problem can be solved by following Make Chrome your default browser. It is set at machine level, not onenote level.

Issues on chrome showing an embedded PDF

I have the following code in a html document:
<p>PDF sample</p>
<object data="http://www.whateverdomain.com/whatever/~/media/sample.pdf" type="application/pdf"></object>
This is working in IE, Firefox but not in Chrome. Appears a grey box in the browser with no embedded pdf. When I check on "network" tab in chrome I'm receiving a HTTP 200 response but PDF is not shown.
I tried URL encode tilde "~" symbol replacing it by %7e but still its not working on Chrome.
I don't have the possibility of changing the url which is provided by an external service.
Do you have any clue on how to solve ?
You might wish to try and use a simple iframe. At the very least I am pretty sure that works for chrome, might not work for IE though. Another alternative is using the Google Docs viewer, with that you are sure to be cross browser compatible, although some pdf's might not render perfectly. The last option you have is using something like pdf.js to render the pdf's yourself inside the browser. Gives you a lot of control and ensures that even people running computers without a pdf viewer installed (or a native pdf viewer like chrome and firefox) will be able to view the file.

Use Adobe reader instead of chrome pdf viewer to display a pdf

I'm outputting a pdf which has been made with scribus, and in all browsers except for chrome it outputs fine, however with chrome the letters are cut off and lower than usual. I found that disabling the chrome pdf viewer fixes the issue locally. But what about users who do not have it disabled? Is there some way I can make adobe reader show it instead of the chrome pdf viewer in my code?
Any help is appreciated,
Thanks
Edit: I can't make the user download the pdf as it is somewhat a preview before they send it in.
One option would be to use a Content-Disposition header to force the PDF to download as an attachment. When the user clicked on the downloaded file, it would then open in their registered PDF viewer rather than in Chrome.
I ended up flattening the pdf using the flatten option, it unified the result accross all browsers.