I am using object to render my pdf it works fine on desktop browsers but on mobile browsers its not opening up pdf file,it says pdf reader not supported on this device.I have tried using embed also but it didn't worked out.
view
<object type="application/pdf"
data="#Url.Content(Model.ReportUrl)"
width="100%" height="100%">PDF reader not supported for this device.
</object>
//tried these also
#*<object type="application/pdf"
data="#Url.Content(Model.ReportUrl)"
width="100%" height="100%">PDF reader not supported for this device.
</object>*#
#*<object type="application/pdf"
data="#Url.Content(Model.ReportUrl)"
width="100%" height="100%">PDF reader not supported for this device.
<embed src="#Url.Content(Model.ReportUrl)" type="application/pdf" width="100%" height="100%" /> </object>*#
I tried searching but not able to find any useful result.
On my phone, when I click on a PDF link it will launch an external PDF viewer. The built in browser doesn't have a plug-in that can process PDFs so it is handled externally. I believe this is done because on the desktop these plug-ins are a major source of security vulnerabilities.
Trying to embed the PDF into a page on the browser may not be viable.
You may want to try browsing to other sites that embed PDFs to determine if your device can do this.
If not, there are things you can do to improve the user experience.
On some sites when it downloads the PDF it ends up in my downloads directory. I then have to go find it and click on it to view it. On other sites I automatically get a dialog asking me what app I want to use to view the PDF as soon as it is downloaded.
Related
tested on iPhone and iPad running iOS12, in chrome and safari
Bug description: after interacting (zooming in/out) with google map (integrated in the site by an iframe) on an iOS device (tested on iOS12) using either chrome or safari, clicking on links outside the map does nothing.
try it out here on codepen
interestengly enough, the bug doesn't happen in jsfiddle
here is a youtube video I made if you don't have an iOS device.
happens on my site which is a plain html page with google maps iframe like so (no other javascript, css files are added for testing purposes):
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d12101.03207249142!2d-74.04012067655368!3d40.690314788042684!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c25090129c363d%3A0x40c6a5770d25022b!2sStatue+of+Liberty+National+Monument!5e0!3m2!1sen!2sus!4v1537933952825" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
the above iframe is obtained straight from google maps "share > embed a map" feature.
Any clues how to get around this bug?
After some research, I have found a solution that works properly.
If you add an event listener to the body it will fix the problem.
document.body.addEventListener("fooAction", function(e) {
// something that does nothing
});
We experience an issue with playing a mp4 file on ipad on webpage with a video HTML 5 player.
Issue:
It does not work on ipad/iphone. On all other platforms (Windows,Android, iOS desktop) it works fine.
This is the code:
<video id="my-video" width="400" height="240" preload="true" controls >
<source src="/media/video/6d9ab49-9936-4194-acvb-3cd9b60521fg/myvideo.mp4" />
</video>
Connected the ipad to the Mac to debug:
A message 'requested resource cannot be found'.
Does sound very clear but does not make sense because the mp4 file is accessible when you paste the url into the browser address bar.
Already tested and checked:
set src of mp4 to fullpath (including https:// or http://) instead of
using the virtual path ;
checked hostingprovider for 'Accept-Ranges: bytes' (with partial content (206) responses) ; settings are ok
play the same mp4 file from a remote url (accessed with or without https); strange but imporant : that works !
So I guess the issue really is that the mp4 can not be found or loaded on ipad.
But why?
Hope someone can help.
Have you tried it like this, include src directly inside <video> tag?
<video id="my-video" src="/media/video/6d9ab49-9936-4194-acvb-3cd9b60521fg/myvideo.mp4" width="400" height="240" preload="true" controls></video>
If it still doesn't work try to use only video element with src, remove preload and controls. Just to see if you can get it to work. And if still no results, try to go for absolute src path.
I had this very same problem serving videos on my Liferay Portal, which works perfectly on PC and Android, but not on iOS devices. After numerous tests, I think I've finally managed to nail down the cause.
For some reason, if the video file (eg MP4) is accessible by a guest user (ie accessible without having to log on to the server), then it will work fine on iOS. However, if the file is only accessible to logged on users, it won't work.
My theory on why this happens is that iOS is probably using a different session to do the range request check than the one used to play the video file. Thus, the range request check fails because the file is inaccessible.
i use JSF <t:inputFileUpload> tag to upload files to my site. It works properly in a PC with all browsers but when I test it in my iPad it does not work. It shows as disabled in iOS 5. It uploads images but not text files or pdf or word or excel files in iOS 6.
Have you faced a similar situation? How can I upload documents and spreadsheets from an iPad onto my site?
This problem is not specific to JSF. It's basically just a HTML code generator. It runs on webserver and produces a bunch of HTML which get sent to the client (in your case, the iPad) and then interpreted over there. The <t:inputFileUpload> just generates a HTML <input type="file">.
That HTML element is in turn indeed disabled in Safari Mobile based browsers. JSF look like a magician, but it really can't control whatever the client decides to do with the retrieved HTML. You'd need to look for a 3rd party client side library which enables this in the Safari Mobile side.
See also:
A html5 web app for mobile safari to upload images from the Photos.app?
upload files via iPad
HTML file browse not working in iPad
If I check this: http://schemes.zwapp.com/
the url scheme for Adobe Reader in iPad is: com.adobe.Adobe-Reader:
So I created a link in my web-page pointing to:
com.adobe.Adobe-Reader://mysite.com/sample.pdf
Clicking the link launches Adobe Reader but it won't download and open the pdf from the url specified. I have tried various variations of the link including:
com.adobe.Adobe-Reader://http://mysite.com/sample.pdf
com.adobe.Adobe-Reader://edit?url=http://mysite.com/sample.pdf
but none of these work. Adobe Reader opens but it does not open the pdf (the link to pdf is fine, I checked by opening separately in browser).
What am I doing wrong? How can I make a app open a specific document by using its url scheme in the browser anchor link.
I don't think you're doing anything wrong. According to this Adobe thread, the Reader app doesn't (yet) support linked references to specific PDFs, but may in a future release. (Or if it does, they're not telling anyone how just yet).
There's an email contact to Adobe at the bottom of that thread that might be able to help more and/or that you might be able to bug to get this feature implemented sooner rather than later.
The HTML file browse element isn’t working in iPad.
Example:
<input type="file" />
The choose file button always remains disabled.
You can’t upload files from an iPad in that way; iPad apps can’t browse the filesystem.
That's true. Safari Mobile doesn't support file transfer over HTTP.