WebSite X5Help Center

 
Tomas Tornyai
Tomas Tornyai
User

Problem with PDF files viewing  en

Автор: 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.

Размещено
4 Ответы
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

Читать больше
Размещено От Jamie B.
Tomas Tornyai
Tomas Tornyai
User
Автор

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

Читать больше
Размещено От Tomas Tornyai
Tomas Tornyai
Tomas Tornyai
User
Автор

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.

Читать больше
Размещено От 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

Читать больше
Размещено От Paul M.