Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dave Weitzel
Printing and PDF production from portlets
February 13, 2014 11:00 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 203

Join Date: November 18, 2009

Recent Posts

I have a portlet that essentially helps a user write a structured report and includes things like graphs and comments

I am having many problems trying to get decent print and pdf output.

Does anyone have experience in doing this? I have different print and pdf jsp files and the pdf is being processed through open office by using code similar to journal content conversion.

Issue I have include:
a) getting page breaks to work in pdf output.
b) getting page footer to be positioned at bottom of pdf page
c) headers and footers generally (cannot find any example on the web of this working in modern browsers - seriously CSS3 HTML5 is no help)
d) centering text
e) managing fonts

So please if yo have any experience on this let me know with some advice/examples

Thanks
Mika Koivisto
RE: Printing and PDF production from portlets
February 13, 2014 12:07 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1513

Join Date: August 7, 2006

Recent Posts

I've used Apache FOP in the past to create very accurately formatted PDFs.
Dave Weitzel
RE: Printing and PDF production from portlets
February 14, 2014 7:46 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 203

Join Date: November 18, 2009

Recent Posts

Thanks for the response Mika
Did you send HTML type output to Apache-FOP?
What is the easiest method of creating data for it, I have been using straight JSP pages hence html and CSS but is that the best way to go for FOP?
Some of what we want is out put from an included portlet (tables of results) so that has to reall be HTML output.

Will may be give it a try anyway
Dave
Juan Gonzalez
RE: Printing and PDF production from portlets
February 14, 2014 11:03 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2856

Join Date: October 28, 2008

Recent Posts

In that case maybe you can take a look at Flying Saucer
Mika Koivisto
RE: Printing and PDF production from portlets
February 14, 2014 2:32 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1513

Join Date: August 7, 2006

Recent Posts

I used XML and XSLT that was transformed to XSL-FO. The xml was created on the fly and xls tempates where pre written for each type of data sheet I was generating. The process went something like the XSLT example here.