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 » Setup & design » PDF documemnts in browser window
expandshrink

PDF documemnts in browser window

PDF documemnts in browser window

Wednesday 13 August 2008 10:12:25 am - 3 replies

Hello,
Is two ways to display PDF document (not only PDF also ms word ...) like attachment or can download it. It is some settings in ez4 there can set it, then user open PDF document its open in same window or download it like attachment.

Thursday 21 August 2008 8:58:47 pm

It will depend on the users browser setting. Some settings will open the document inside the browser, others will open it in with an external program (Acrobat or Word), and others will download it.
You cannot choose which one it is. Although you can force the browser to always download the file instead of using the browsers default behaviour. Which is what eZ does.

Saturday 04 April 2009 6:18:20 pm

You say that eZP forces the browser to download the file instead of using the browser's default behaviour. How can we turn that off?

Saturday 04 April 2009 6:41:10 pm

OK guys, figured it out myself. In case anyone else needs this:

the config file settings/file.ini has an (undocumented ...) section, where you can associate a content-disposition method [1] for mime-types. I.e. you can specify that PDFs should be displayed in the browser. Works only if the browser can handle that type of file (i.e. has a PDF-plugin installed).

The section looks like this and can be overriden in an override-template:

[PassThroughSettings]
# The default value for mime types not specified using ContentDisposition
# is "attachment". Possible values are attachment or inline.
ContentDisposition[application/x-shockwave-flash]=inline

Cheers,
Felix

[1] http://www.ietf.org/rfc/rfc2183.txt

Modified on Saturday 04 April 2009 6:42:07 pm by Felix Leimbach

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from