WebSite X5Help Center

 
Tomas Tornyai
Tomas Tornyai
User

Problem with PDF files viewing  en

Autor: Tomas Tornyai
Visitado 890, Seguidores 2, Compartilhado 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.

Publicado em
4 RESPOSTAS
Jamie B.
Jamie B.
User

When you add a pdf file tick the open new window, this should open a new browser tab with the pdf file.

regards

jamie

Ler mais
Publicado em de Jamie B.
Tomas Tornyai
Tomas Tornyai
User
Autor

??? Where to tick ? In widgets I dont see anything to tick.

Ler mais
Publicado em de Tomas Tornyai
Tomas Tornyai
Tomas Tornyai
User
Autor

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.

Ler mais
Publicado em de Tomas Tornyai
Paul M.
Paul M.
Moderator

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

Ler mais
Publicado em de Paul M.