Fórum

Printing search results

Abhishek Dhingra, modificado 11 Anos atrás.

Printing search results

Junior Member Postagens: 51 Data de Entrada: 08/04/11 Postagens Recentes
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
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Printing search results

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
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, modificado 11 Anos atrás.

RE: Printing search results

Junior Member Postagens: 51 Data de Entrada: 08/04/11 Postagens Recentes
Hi,

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

Thanks,
Abhishek
Abhishek Dhingra, modificado 11 Anos atrás.

RE: Printing search results

Junior Member Postagens: 51 Data de Entrada: 08/04/11 Postagens Recentes
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