xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: FOP 0.92 and RTF
Date Mon, 06 Nov 2006 14:12:09 GMT

On 06.11.2006 09:45:31 Michael Bruns wrote:
> Hi,
> 
> one of our product managers had the "brilliant" idea to support both PDF
> and RTF for some documents so that our customers can mess up the
> documents we generate to their liking...yeah, whatever.

I know about product managers. :-)

> As I said we already have a working environment which generates PDF from
> XML via XSL-FO with the help of FOP 0.92, and I was pleased to see that
> FOP also supports RTF because I really like FOP and the way it works :-)
>  So what I tried was (heavily stripped down) the following:
> 
> Fop rtfFop = fopFactory.newFop(MimeConstants.MIME_RTF, rtfOut);
> Source rtfSource = new DOMSource(doc);
> Result rtfResult = new SAXResult(rtfFop.getDefaultHandler());
> transformer.transform(rtfSource, rtfResult);
> rtfFop.close();
> 
> Well, it works...somehow ;-) It really produced an RTF-document, but all
> the beautiful design that my PDFs contain was missing - no tables,
> regions, absolute positions...

Yeah, well, the RTF output doesn't have the same quality as PDF. The RTF
handler itself is probably not that advanced itself but in addition to
that there are some things in XSL-FO that simply cannot be expressed in
RTF. So RTF is definitely not a complete alternative to PDF output. With
some investment the RTF output can certainly be improved but only to a
certain degree. Also keep in mind that RTF is not a very beautiful format
(to use some nice words) and should IMO not be used for new projects. If
you need to be able to change the generated file in a word processor I'd
try to find out if the Open Document Format is a possibility. That's a
better investment in the future. But FOP does not yet produce ODF.

> I understand that this is not the way you show in your examples, where
> you use stuff like "RtfTable tbl = foo.newTable(bar);".

That's only a valid example if you want to use the RTF library directly,
not when you want to convert XSL-FO.

> But my question
> is now anyway: Will the way I want to use RTF-generation ever be
> completely supported by FOP? I.e. will there be a chance to have just
> _one_ XSL-FO which I can use for both PDF and RTF?

For simpler documents, yes, but not for more complex documents.

> If not, I have a strong argument against the product manager - if
> yes...well, some more work for me ;-)
> 
> Thanks in advance!
> 
> Cheers,
> 
> Michael


Jeremias Maerki


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


Mime
View raw message