Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Abhishek Dhingra
Printing search results
April 29, 2012 1:58 AM
Answer

Abhishek Dhingra

Rank: Junior Member

Posts: 52

Join Date: April 7, 2011

Recent Posts

Hi All,

I have a requirement - i am displaying search results on a page using search container. I want to print the results in a table format (the way we display using search container).

If i used print() in a Javascript, it prints the full page content including banner and menus etc...But i want to print only the search results. Can anyone please help me.

Thanks,
Abhishek
Hitoshi Ozawa
RE: Printing search results
April 29, 2012 2:03 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

I think the usual way to do this is to use define a print page.

<link rel="stylesheet" href="print.css" type="text/css" media="print" />
Abhishek Dhingra
RE: Printing search results
April 29, 2012 11:26 AM
Answer

Abhishek Dhingra

Rank: Junior Member

Posts: 52

Join Date: April 7, 2011

Recent Posts

Hi,

I am looking for the same functionality which liferay is using, as shown in the attached JPG. Please help.

Thanks,
Abhishek
Attachment

Attachments: untitled.JPG (11.4k)
Abhishek Dhingra
RE: Printing search results
April 29, 2012 12:59 PM
Answer

Abhishek Dhingra

Rank: Junior Member

Posts: 52

Join Date: April 7, 2011

Recent Posts

Hi All,

Case 1:
Implementing Print functionality for a web content
http://kamalkantrajput.blogspot.in/2009/10/implementing-print-functionality-for.html
Using The above link - It will print as a screenshot (image)

Case 2:
http://www.liferay.com/community/wiki/-/wiki/Main/Generate+PDF+File+in+Portlet
If a user wants to generate the PDF/Excel, as well we can make use of Print functionality of PDF once the PDF will be generated.
We need to download the IText Jars and include in Classpath.

Both the things works fine, only in Case 1, the pagination and all that we need to handle separately.
Thanks,
Abhishek