I have a server side component (i.e. a Servlet) that creates a PDF file and sent it back to the browser with this response header:
response.setContentType("application/pdf");
response.setHeader("Cache-Control", "cache");
response.setHeader("Pragma", "cache");
response.setHeader("Content-Disposition", "attachment;filename=document.pdf");
All works fine in all browser except on iPad. On iPad the content is showed but the browser does not ask me if I want to save the file.
Any idea how to fix this issue?
Ok I found that it was the correct ipda behaviour: if is not installed any program that can handle pdf (e.g. FileApp) safari shows the preview in a read-only mode.
If it is installed a program that can handle those files safari prompts for what to do on those file.
Massimo