You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Flynn <pe...@silmaril.ie> on 2010/04/28 15:59:28 UTC

Calling LaTeX from within Cocoon

A common solution to the requirement to generate publication-quality PDF is to use XSLT to create LaTeX code and rely on LaTeX's understanding of documents and library of pre-written packages to create the PDF.

For real-time web applications it would be very useful to be able to drive this from within Cocoon rather than having to call out to a CGI script. As Cocoon can only call Java resources, and can only accept XML return, would it be possible to write a small Java stub whose classes can be added to Cocoon, that would do the business of running LaTeX over the XSLT output in the pipeline and returning the PDF?

I don't do Java, so I would be interested to know if this is even possible.

///Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Calling LaTeX from within Cocoon

Posted by warrell harries <wa...@googlemail.com>.
Definitely possible. You could have a look at the FINS project as a good
example of how to to this sort of thing. In that case they use XML as an
interface to JFreeChart.

You can write a custom serializer and/or transformer. Of course the
preferred way is to use XSL:FO and a number of people have interfaced the
latest release of the Apache FO project with current version of Cocoon.

Regards

Warrell

On 28 April 2010 14:59, Peter Flynn <pe...@silmaril.ie> wrote:

> A common solution to the requirement to generate publication-quality PDF is
> to use XSLT to create LaTeX code and rely on LaTeX's understanding of
> documents and library of pre-written packages to create the PDF.
>
> For real-time web applications it would be very useful to be able to drive
> this from within Cocoon rather than having to call out to a CGI script. As
> Cocoon can only call Java resources, and can only accept XML return, would
> it be possible to write a small Java stub whose classes can be added to
> Cocoon, that would do the business of running LaTeX over the XSLT output in
> the pipeline and returning the PDF?
>
> I don't do Java, so I would be interested to know if this is even possible.
>
> ///Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: Calling LaTeX from within Cocoon

Posted by Hugh Sparks <hu...@csparks.com>.
I haven't quite got this ready for publication yet, but take a look at:

    http://www.csparks.com/jeuler/index.jhtml

It's written for cocoon 2.2. 
Somewhat unique is that it uses a shell script to perform one stage
of the pipeline. It works under linux and windows (with cygwin). 

Here are some cocoon 2.2 pages made using jeuler:

    http://www.csparks.com/watchmaking/CycloidalGears/index.jhtml

    http://www.csparks.com/ForceTransform/index.jhtml

-Hugh Sparks


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org