velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Lybarger" <Mark.Lybar...@CBC-Companies.com>
Subject RE: VM templates producing PDFs
Date Thu, 07 Oct 2004 13:20:10 GMT
Peter,

We're also generating PDFs using custom velocity templates to render "data", stylesheets to
transform the data into xsl:fo, and then the fop to generate a pdf.  if there's a more generic
tool available, i'd be most happy to check it out. anything to use more "tested" tools. any
ideas when you might be able to make this available?

~mark

> -----Original Message-----
> From: Peter Harrison [mailto:peter.harrison@nothingbutnet.co.nz]
> Sent: Thursday, October 07, 2004 4:34 AM
> To: Velocity Users List
> Subject: Re: VM templates producing PDFs
> 
> 
> On Thu, 07 Oct 2004 20:32, Ryan Lea wrote:
> > Hi,
> >
> > Have just read on another thread that velocity has been 
> used to produce
> > custome PDF's.  I had been thinking of using something like 
> cocoon and
> > xslt.
> >
> > Sooo .... was just wondering how many people have used velocity to
> > create PDF's and probably more to the point, how?
> 
> We have used Velocity to create both PDF's and OpenOffice documents.
> 
> In fact the same template now creates both HTML and PDF.
> 
> The template defines the structure but not the layout. The 
> first stage our 
> system goes through is rendering XML from the template 
> through velocity. This 
> process imbeds the data into the template.
> 
> The second stage is a XSLT transform depending on the target 
> format. If the 
> required result is HTML the XML is moved directly into HTML 
> using our HTML 
> Transform. If the target format is PDF we have a XSLT 
> transform which turns 
> it into an intermediate XML. This is then put through a final 
> third transform 
> to create XSL:FO - Formatting Objects. We then use a open 
> source FO Engine to 
> render the XSL:FO into a PDF.
> 
> We also have a more simple approach which will mean you have 
> to write special 
> XML format in order to create PDF's - essentially we drop the 
> intermediate 
> few stages and go directly to the final two transforms before 
> rendering.
> 
> There are also different ways of handling the output. The 
> simple way is that 
> it is output from a servlet - the user just gets the PDF. 
> However, in our 
> line of work we often need to also store the document. We have other 
> utilities which can generate the document, save it in a 
> database, and also 
> return it to the user. We also generate multiple documents 
> all in the same 
> request - although we obviously don't open them for the user 
> all at the same 
> time.
> 
> What even better - we will be making all of this open source. 
> I'm thinking 
> about dropping it into velocity tools - although what we have 
> now would be 
> much more than just velocity tools.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message