Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dave Weitzel
Pringing jsp file has too much white space
October 2, 2013 8:29 PM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 169

Join Date: November 18, 2009

Recent Posts

I have a jsp from my custom portlet that I need to be printed and also exported to pdf.
I can get all the plumbing and user interface working nicely but the out put has a ton of white space before you get to the target content.
I am using a printURL like this to generate the output:
1
2        PortletURL printPageURL = renderResponse.createRenderURL();
3                printPageURL.setWindowState(LiferayWindowState.POP_UP);
4                printPageURL.setParameter("jspPage", "/html/plan/printPlan.jsp");
5                printPageURL.setParameter("planId", Long.toString(currentPlan.getPlanId()));
6                printPageURL.setParameter("viewMode", Constants.PRINT);

this is same code as the pdf (using openoffice converter) as well.

It may be related to an issue I have about the amoun tof header scripts loaded in popup mode when not needed but I cannot see where the white space content comes from when viewing firebug out put.

In some cases I get a complete blank page and more before I get o the page title.

Any ideas what is happening
David H Nebinger
RE: Pringing jsp file has too much white space
October 3, 2013 6:12 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6469

Join Date: September 1, 2006

Recent Posts

CSS controls the print layout also; have you checked the rendered JSP in this mode to see what the CSS is forcing?