Problem with PDF files viewing
Автор: Tomas Tornyai
Просмотрено 891,
Подписчики 2,
Размещенный 0
Hello,
I have problem with PDF file view on my pages. On android devices but on some standard pc´s too, the pdf files are automatically downloaded and must be viewed only in external viewer. But I need it to be displayed on page. www.metex.sk for example.
Размещено
When you add a pdf file tick the open new window, this should open a new browser tab with the pdf file.
regards
jamie
Автор
??? Where to tick ? In widgets I dont see anything to tick.
Автор
You mean probably open PDF not by widget but link to PDF file. But the result is the same. PDF is automatically downloaded in new window.
Hello Tomas,
There is no surefire way to guarantee with 100% success that your PDF file will be viewed in the user's browser as opposed to downloaded. This is because the mechanism which decides on either course of action is contained within the user's browser itself, and this is something you have no control over.
All you can do is try to influence browser behaviour by sending headers along with your PDF file:
Content-Type: application/pdf
Content-Disposition: inline; filename="name_of_your_pdf_file.pdf"
Even this is not foolproof, as some browsers may have no means of rendering a PDF file inline.
The best course of action (if you have PDF content which you wish to display online) would be to convert the PDF to some other format which can be universally understood by the browsers... a jQuery flipbook, perhaps?
Kind regards,
Paul