留言板

In navigation link I need to open PDF directly in browser

sangeeth k,修改在11 年前。

In navigation link I need to open PDF directly in browser

Regular Member 帖子: 114 加入日期: 12-4-22 最近的帖子
Hi all,

I am trying to open PDF file directly in browser,

what i did First i uploaded document in Document library and I get the path like this
/c/document_library/get_file?uuid=847aa31f-f639-4ca1-a6c2-8e7600bc23d6&groupId=10157


Here issue is its opening as a optional formate open save

I need to open onclick PDF directly in browser....

can any one help in this issue..

Thanks
thumbnail
Hitoshi Ozawa,修改在11 年前。

RE: In navigation link I need to open PDF directly in browser

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
What's the problem? Just set the link to point to the url of the pdf file in the document library. You may need to setup your web browser to open pdf files.
sangeeth k,修改在11 年前。

RE: In navigation link I need to open PDF directly in browser

Regular Member 帖子: 114 加入日期: 12-4-22 最近的帖子
hitoshi

after linking that URL I am getting the popup box with open save options, But i need to open PDF directly in browser.
thumbnail
Shinn Lok,修改在11 年前。

RE: In navigation link I need to open PDF directly in browser

Junior Member 帖子: 89 加入日期: 11-1-14 最近的帖子
    #
    # Input a list of comma delimited extensions for which the content
    # disposition header has to be set to "inline".
    #
    mime.types.content.disposition.inline=flv,gif,jpg,pdf,png,swf,wmv

The portal.property should make the content disposition inline instead of attachment so that it will try to open the file in your browser before it forces a download. Like Hitoshi said, it might be a configuration with your browser.
sangeeth k,修改在11 年前。

RE: In navigation link I need to open PDF directly in browser

Regular Member 帖子: 114 加入日期: 12-4-22 最近的帖子
Hi Shinn Lok,

I added properties in portal-ext.proeprties
mime.types.content.disposition.inline=flv,gif,jpg,pdf,png,swf,wmv


But still I am getting Popup box

this is my link of PDF file

/c/document_library/get_file?uuid=847aa31f-f639-4ca1-a6c2-8e7600bc23d6&groupId=10157


can i missing any thing....
thumbnail
Shinn Lok,修改在11 年前。

RE: In navigation link I need to open PDF directly in browser

Junior Member 帖子: 89 加入日期: 11-1-14 最近的帖子
Those are the default properties. The question is whether or not your browser is properly configured to open PDFs. You can test this by going to

http://www.liferay.com/documentation/liferay-portal/6.0/development

and clicking on the PDF PDF near the right hand side. If it does not open like how you expect your Liferay to, it confirms that it is your browser/PDF reader's settings.
sangeeth k,修改在11 年前。

RE: In navigation link I need to open PDF directly in browser

Regular Member 帖子: 114 加入日期: 12-4-22 最近的帖子
Hi

liferay link PDF is opening in my browser... so no browser issue....

In general webcontent portlet i am attaching that link its opening for that webcontent portlet.

But my scenario is, In theme navigation.vm file I have a link I am attaching that link like below.......

<li><a href="/c/document_library/get_file?uuid=2cee54e3-3bbc-4d77-a060-5308892cdbdf&amp;groupId=10157">Current Month</a></li>


and i added properties like you said........

But still i am getting POPUP

Thanks for reply.....
thumbnail
Hitoshi Ozawa,修改在11 年前。

RE: In navigation link I need to open PDF directly in browser

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
Which web browser and version are you using? Can you try with IE 8?
thumbnail
Pradeep Kumar Badhai,修改在11 年前。

RE: In navigation link I need to open PDF directly in browser

Junior Member 帖子: 50 加入日期: 11-9-6 最近的帖子
Liferay is not compatible with IE for PDF or Excel doc rendering or downloading. Other browser works fine.
thumbnail
Rafael Lluis,修改在10 年前。

RE: In navigation link I need to open PDF directly in browser

Junior Member 帖子: 30 加入日期: 12-10-15 最近的帖子
sangeeth k:
Hi

liferay link PDF is opening in my browser... so no browser issue....

In general webcontent portlet i am attaching that link its opening for that webcontent portlet.

But my scenario is, In theme navigation.vm file I have a link I am attaching that link like below.......

<li><a href="/c/document_library/get_file?uuid=2cee54e3-3bbc-4d77-a060-5308892cdbdf&amp;groupId=10157">Current Month</a></li>


and i added properties like you said........

But still i am getting POPUP

Thanks for reply.....



What I have confirmed more or less is:

1. If you use get_file and the uuid in the link (https://xxx.xx/c/document_library/get_file?uuid=cf8b4745-c55c-41b8-94d0-59ac0edebf4e&groupId=10124) Liferay offers the PDF like an attachment showing up a pop up window with the options Open, Save, Save as

2. If you use a link based on the name of the file (which is the link that the control panel uses or the link that WYSIWYG editor generates) (https://xxx.xx/documents/10124/12870/20130910100138_manual+JSF) Liferay opens the PDF directly

I am using IE9 in both cases

So ¿what kind of URL to point to a file does Liferay recommends?

Thank you
Joan Fluvia,修改在9 年前。

RE: In navigation link I need to open PDF directly in browser

New Member 帖子: 13 加入日期: 13-11-6 最近的帖子
I confirm what Rafael is saying, but in case 2, I found a few times where the browser still download the file (Maybe 1 each few hundred times).

I don't know why this is happening... maybe the person uploading the file used an old browser (most if not all the times was from pdfs uploaded by the same person)... maybe many uploads had been made at same time...

The only way I found to solve this is downloading the file and replace it uploading it again.