组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Pooja P Joshi
Print Preview Functionality-Any Help?
2010年1月28日 上午8:14
答复

Pooja P Joshi

等级: New Member

帖子: 10

加入日期: 2009年11月18日

最近的帖子

Hi All,

Has any one implemented Print Preview Functionality? I have more then one Web Content Display portlets configured in a page along with Print Preview Portlet. On clicking on Print We have to show Print Preview of all Web Content Display portlets only in one Pop up.

Please revert back if any one has any idea/implementation.

Thanks,
-Pooja
Corné Aussems
RE: Print Preview Functionality-Any Help?
2010年1月29日 下午2:20
答复

Corné Aussems

等级: Liferay Legend

帖子: 1311

加入日期: 2006年10月3日

最近的帖子

Try popping up the whole page,
and set the media="print" CSS style sheet to screen with a script
Zankar Shah
RE: Print Preview Functionality-Any Help?
2010年1月29日 下午4:26
答复

Zankar Shah

等级: Regular Member

帖子: 105

加入日期: 2007年10月3日

最近的帖子

Hi Pooja

I am not sure how can we achieve this OOTB

However you can always customize to create a new page as a pop up (pop up portlet is also not a bad option) which will take the existing articles as parameters and in that portlet you can call API to show all the articles as per needed....
Anil Perim Fernandes
RE: Print Preview Functionality-Any Help?
2010年11月19日 上午2:31
答复

Anil Perim Fernandes

等级: New Member

帖子: 4

加入日期: 2009年10月19日

最近的帖子

This may help w.r.t. implementing Print. Though this works fine in FF 3.6.10 and Chrome, it has latency/performance issues in IE 7. Anyone with a fix for this ?

<style type="text/css">
@media print {
#printButton {
display:none;
}
#aui-3-2-0PR1-1339 {
display:none;
}
#dockbar {
display:none;
}
#heading {
display:none;
}
#navigation {
display:none;
}
#breadcrumbs {
display:none;
}
.breadcrumbs lfr-component {
display:none;
}
.portlet-title {
display:none;
}
.portlet-topper {
display:none;
}
#banner {
display:none;
}
.site-breadcrumbs lfr-hudcrumbs{
display:none;
}
}
</style>
<script type="text/javascript">

function ClickHereToPrint(){
try{
var oIframe = document.getElementById('printframe');
var oContent = document.getElementById('termsconditionDiv').innerHTML;
var oDoc = (oIframe.contentWindow || oIframe.contentDocument);
var nav12Css = document.getElementsByTagName('nav');
var i;
for(i=0;i<nav12Css.length;i++){
var nav1Css = document.getElementsByTagName('nav');
nav1Css.parentNode.removeChild(nav1Css);
}
if (oDoc.document) oDoc = oDoc.document;
oDoc.write("<html><head><title>title</title>");
oDoc.write("</head><body style='margin-bottom:-500px;' onload='this.focus(); this.print();'>");
oDoc.write(oContent + "</body></html>");
oDoc.close();
}
catch(e){
self.print();
}
}

Anil Perim Fernandes
RE: Print Preview Functionality-Any Help?
2010年11月24日 下午10:11
答复

Anil Perim Fernandes

等级: New Member

帖子: 4

加入日期: 2009年10月19日

最近的帖子

Found a solution approach at :

http://winfolinx.com/tips/howto/various/printready.htm

Worked fine.