struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject Re: [SAF2] Tossing an idea around: PDFResult
Date Mon, 05 Jun 2006 20:28:31 GMT
At 3:38 PM -0400 6/5/06, Frank W. Zammetti wrote:
>Not a bad idea... I've never been a big fan of XSLT, always seemed overly
>difficult to me for what it was, but certainly sticking with a standard
>has appeal, and I've done a little bit of FOP work, so it's not all new.
>
>One thing I was thinking about for the Ajax result stuff was to have
>optionally a toXML() and toJSON() method on the Action... if they are
>present, they would be used by the Results rather than the automatic
>generation process... would allow for more complex outputs than the
>automatic process is capable of.. having toXML() on the Action might be a
>good idea in general, precisely for things like PDF generation and the
>XSLT Result you mention.  Maybe some default implementation (the one from
>AjaxXMLResult possibly?) in ActionSupport might open some doors?
>
>In any case, I may have to play with your suggestion a bit and see what it
>might look like... I like the idea of using standards, but I have some
>doubts as to how easy it would be for developers to use, generally.

It depends a lot upon your use case -- but for starters, this very 
question suggests that if you do write anything, you should call it 
ITextResult, or FOPResult, not PDFResult.

Writing FO can be kind of tedious, while IText has an API that is 
pretty well suited to just flowing text in if you have simple needs. 
I haven't used either exhaustively -- my day job is a LOT about 
generating PDFs but ours need much finer design control than either 
of those APIs really support.

It seems like design of a generalized (custom) XML format for 
describing PDF templates for iText is a pretty big chunk of 
responsibility which doesn't really belong at Struts.  It seems like 
something that should be done in cooperation with the iText team for 
eventual integration to their project, or if not, to be served 
independently.

Is there any problem with iText's license? (dual LGPL/MPL)?  May be 
worth a look at PDFBox, which is BSD licensed: http://pdfbox.org/

Just a few fragmentary thoughts...

Joe



-- 
Joe Germuska
Joe@Germuska.com * http://blog.germuska.com    

"You really can't burn anything out by trying something new, and
even if you can burn it out, it can be fixed.  Try something new."
	-- Robert Moog

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message