View PDF on Mobile with downloading - html

I have the following link to a PDF document on my website:
Example
On PC it opens up the document using a PDF reader, however on mobile and tablet devices it asks the user to "Download" the PDF to their local storage. Is there a way to make it open PDF documents on mobile and tablet without downloading? I want the view to remain in the browser.

Try to use Google Docs Viewer by appending URL
https://docs.google.com/viewer?url=
https://docs.google.com/viewer?url=https://mywebsite.com/mydocument.pdf

Related

Chrome mobile device emulator not able to load PDFs

I was trying to load a PDF document in mobile emulator(select any mobile device), it didn't show and kept loading while in the Network tabs, it was being downloaded and shown 200 status code for the PDF document.
While the same link worked in Desktop mode.

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.

Is there a way to make a mobile browser to open a pdf and not to download it

I know that simple mobile browsers don't have the feature to make this, but I want that a smartphone could open a link to a pdf file. This is important because I want to open pdf in a given page like this:
Open page 4
This works on chrome and firefox, but when in mobile it just downloads the pdf.
I'm using bootstrap.
One option would be by converting it to html5 / html4 using FlexPaper. There are multiple options including open source options. Have a look here:
http://flexpaper.devaldi.com

Save PDF form Chrome IFRAME

I am POSTING a form to an IFRAME (target) which returns a PDF (content-disposition=inline;filename="x.pdf").
This works with current Chrome and Firefox and the embedded PDF viewer.
The only problem is, that Chrome is not able to save the PDF (it tries to save x.html with no content) (with Ctrl+S and with the icon in the PDF toolbar).
Any ideas?
Actually, it is a limitation from native Chrome PDF Viewer. You cannot save PDF file when it is displayed from an iframe using Chrome PDF Viewer (plugin).
Using Adobe Reader plugin for Chrome works perfectly.
Cheers

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.