[ale] HTML -> PS -> PDF

Christopher Fowler cfowler at outpostsentinel.com
Thu Apr 1 09:51:25 EST 2004


On Thu, 2004-04-01 at 09:45, Michael D. Hirsch wrote:
> On Wednesday 31 March 2004 03:47 pm, Chris Fowler wrote:
> > I'm creating a J2EE app in which the user can generate reports.  I want
> > to generate a report in HTML format and store in /tmp as temp file.  I
> > then want to somehow convert that to PDF maybe I have to go the PS
> > first.
> >
> > After I do that I will send their browser headers that indicate I'm
> > sending them a file.  The will then be prompted to save to disk or load
> > in Acrobat or in our (ale.org) case xpdf.
> >
> > Any pointers?
> 
> I think you'd have a lot more success generating XML instead of HTML.  Then 
> you can convert the XML to HTML easily (e.g. with XSLT).  A quick google 
> search will turn up any number of XML->PDF systems.  A good one loks like FOP 
> from the Apache Project: http://xml.apache.org/fop/

Agreed

> 
> It says: FOP (Formatting Objects Processor) is the world's first print 
> formatter driven by XSL formatting objects (XSL-FO) and the world's first 
> output independent formatter. It is a Java application that reads a 
> formatting object (FO) tree and renders the resulting pages to a specified 
> output. Output formats currently supported include PDF, PCL, PS, SVG, XML 
> (area tree representation), Print, AWT, MIF and TXT. The primary output 
> target is PDF. 
> 

Either the web page is too nice or it is a good piece of code.  I have a
guy that works with me that is a pro at XSLT.  This will be on his list.

> Michael



More information about the Ale mailing list