WebSite X5Help Center

 
Tomas Tornyai
Tomas Tornyai
User

Problem with PDF files viewing  en

Autore: Tomas Tornyai
Visite 888, Followers 2, Condiviso 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.

Postato il
4 RISPOSTE
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

Leggi di più
Postato il da Jamie B.
Tomas Tornyai
Tomas Tornyai
User
Autore

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

Leggi di più
Postato il da Tomas Tornyai
Tomas Tornyai
Tomas Tornyai
User
Autore

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.

Leggi di più
Postato il da 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

Leggi di più
Postato il da Paul M.