This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » I just want to open PDF in a new...
expandshrink

I just want to open PDF in a new browser directly, and it doesn't want to be downloaded

I just want to open PDF in a new browser directly, and it doesn't want to be downloaded

Monday 18 June 2012 10:16:07 am - 1 reply

I just want to open PDF in a new browser directly, and it doesn't want to be downloaded, at the same time, it requires to use the original file name, not use the hash code as file name.

Monday 18 June 2012 10:46:30 am

Hi David,

not exactly sure if this is what you're looking for regarding the 'opening' and 'downloading', but posting it anyway:

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/file.ini/PassThroughSettings/ContentDisposition

In file.ini use the following setting to display PDFs directly in your browser:

[PassThroughSettings]
ContentDisposition[application/x-pdf]=inline

This should be the 'clean' solution, but in my experience this doesn't always work and fails in some browsers.

Another solution I used before is to create a link to the direct path where the PDF is stored, like this:

<domain>/var/ezflow_site/storage/original/application/<hash>.pdf

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from