I\'m currently facing a weird problem in my webpage on android devices.
What I want to do is to allow a user to download a pdf-file to his mobile device. Therefore I pro
had the same problem. I used the example code from primefaces.org for downloading a pdf with mobile devices. It was working fine "on my machine" but not on a iPad Safari or Android browsers. Problem was the content type in the Example-Controller provided in the showcase:
file = new DefaultStreamedContent(stream, "image/jpg", "some.pdf");
Which works only for images. Well, brain on mode:
file = new DefaultStreamedContent(stream, "application/pdf", "some.pdf");
and everything works fine now.