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
<chris.cranf...@setech.com> 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: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to