struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel <>
Subject Re: Struts2 - Html to PDF
Date Sat, 24 Jul 2010 22:32:58 GMT
FOP is good, but it transforms from XML-FO to PDF (and lots of other
target formats).
If you want to tranform html to pdf you need a 3 stage process:
first you write XHTML with CSS using what ever you have/know/like.
Then you transform it to XML-FO using CSS2XSLFO
Then you transform this to PDF using FOP (or others front-ends)

Please be warned that this combination is very flexible but has very
odd limitations.
For reporting uses, you may want also to look jasper reports and BIRT
that also exports to PDF.

Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco Sobrino

On Sat, Jul 24, 2010 at 09:08, Martin Gainty <> wrote:
> i dont know how Crystal can ingest either XSD schema entities or POJOs..maybe someone
out there knows of a converter?
> FOP transform is the best solution offered
> Good Call!
> Martin
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so
bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer
Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und
entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails
koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> Date: Fri, 23 Jul 2010 17:33:23 -0400
>> Subject: Re: Struts2 - Html to PDF
>> From:
>> To:
>> I'd assume it's possible, but probably not the best choice... I would
>> take a look at doing either a Jasper report or using Apache FOP. The
>> choice will have to do with the nature of the PDF you are trying to
>> generate. Jasper is a reporting platform... Think of Crystal Reports,
>> there is a report designer, you then back the report with data and
>> render. Jasper uses iText to generate PDFs, and it will let you create
>> more of a "document" than a bunch of code.
>> If your output will be hard to model in a traditional reporting
>> platform, then take a look at Apache FOP. It's very complicated, but
>> think of it this way -
>> You start with XML modelling your data, then pass it through a
>> transform that kicks out XSL-FO, then you have Apache FOP turn it into
>> a PDF. I don't have any real experience with it, so I might be giving
>> you bad information (and hope someone will correct me). But, in this
>> scenario, you are generating XML which represents the data you are
>> passing to the output. The transform is done using XSLT? Which is
>> another standard. What you generate is an XSL-FO document. This
>> document can be rendered as a PDF by FOP. Although it's a more
>> complicated process than the first choice, it does add some
>> flexibility since you can drop-in replace different components (the
>> transformer, the FO-to-PDF converter, probably), plus, you can create
>> other XSLTs that generate other output. With Jasper, you'll probably
>> be locked into PDF, HTML and Excel (CSV).
>> -Wes
>> On Fri, Jul 23, 2010 at 4:43 PM, CRANFORD, CHRIS
>> <> wrote:
>> > Is it possible to extend the default ServletDispatcherResult to parse
>> > the HTML output and pass the result content to the browser as a PDF
>> > document?  Or is there a better approach to doing this?  What I want to
>> > be able to do is to allow easy creation of PDF documents from HTML
>> > content.  Presently I am looking to use iText but this isn't a firm
>> > choice and another option that may work better is possible.
>> >
>> > Chris
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> > For additional commands, e-mail:
>> >
>> >
>> --
>> Wes Wannemacher
>> Head Engineer, WanTii, Inc.
>> Need Training? Struts, Spring, Maven, Tomcat...
>> Ask me for a quote!
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> _________________________________________________________________
> The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message