[Klug-general] Document Production

MacGyveR macgyver at thedumbterminal.co.uk
Wed Feb 16 21:10:49 UTC 2011


On Monday 14 Feb 2011, Peter Childs wrote:
> On 14 February 2011 19:26, Peter Childs <pchilds at bcs.org> wrote:
> > On 14 February 2011 19:04, Mike Evans <mike at tandem.f9.co.uk> wrote:
> >> I would suggest you look at XML and XSL-FO rather than HTML
> >>
> >> http://en.wikipedia.org/wiki/XSL_Formatting_Objects
> >>
> >> If you're not scared of Java then there is always the apache FOP project
> >> which is a XSL-FO print driver.  One set of mark up can be transformed
> >> into any of: PDF, PS, PCL, AFP, XML (area tree representation), Print,
> >> AWT and PNG, and to a lesser extent, RTF and TXT.
> >>
> >> There are also XSL-FO processors for C/C++ and probably Python, though
> >> I've never used them.
> >>
> >> Mike
> >
> > Brain Melt Down.
> >
> > Its a file format then? So are there standard tools for dealing with it
> > right or what?
> >
> > I don't understand....
> >
> >
> > Peter.
>
> Oh Right.....
>
> so XSL describe a document and how to takes xml data to produce an end
> product.
>
> So I need an XML based method to describe by document.
>
> Now I wonder what that would be? Looks fine for HTML but I'm dealing in
> paper....
>
> Peter.

Steps would be:

1) Generate/write your documents in XML, using your own tags to give 
structure, such as paragraph breaks, heading, columns, images etc..

2) Create a XSL style sheet that will transform your XML into XSL-FO.

2a) Create a XSL style sheet to HTML for debugging/preview (optional but 
handy)

3) Use the example java code on the FOP site to build a converter that will 
convert the XSL-FO into PDF:

http://xmlgraphics.apache.org/fop/1.0/embedding.html#render-with-xslt



More information about the Kent mailing list