[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK-APPS: [INFO] transforming docbook sources into RTF documents
hello, i've recently tried to convert my docbook documents into RTF, unfortunatly accomplishing that goal is not as easy as transforming XML into HTML etc. i thought some of you might be interested if i share my knowledge of transforming docbook documents into RTF - if not please excuse the OT traffic. first of all i tried JFor which is a RTF open source processor. unfortunatly JFor is only able to handle ... -> mm, cm, pt width attributes. which makes JFor complaining about %, em etc. width atributes. AFAIK the JFor people aren't working towards solving that problem ASAP cause it takes some work to refactor their system architecture to recognize more types of width attributes. so i decided to switch to XFC (www.xmlmind.com), which in fact produces more convenient RTF results. unfortunatly i had some problems with my inline images which were crippled/cropped in the resulting RTF. because of that reason i wrote to the XFC list and they finally fixed the image problem. that means XFC now produces propper RTF output taking FO object trees as an input. below is the result from writing to the XFC list. regards daniel s. haischt -- -----Ursprungliche Nachricht----- Von: john@pixware.fr [mailto:john@pixware.fr] Gesendet: Mittwoch, 29. Januar 2003 13:41 An: Daniel S. Haischt Cc: XFC-Support Betreff: Re: [XFC] [QUESTION] images in RTF are crippled "Daniel S. Haischt" wrote: > > i've just tried to convert the FO files that i've > produced using the docbook FO stylesheets and saxon > to RTF. > > in my XML sourcefiles i have some imagedata object > that i declared like this ... > > --------8<--------------8<------------8<---------- > > <imagedata fileref="foobar.png" > scale="100" > format="PNG" > align="center" > valign="top"/> > > -------->8-------------->8------------>8---------- > > the problem i am having is that the images are crippled > in the resulting RTF file. crippled means that their width > will be preserved but their height is allwys set to something > about ten pixels - that means each image is 10 pixles high. > > does that mean i have to use the ... > > - contentwidth > - contentdepth > > attributes to set the actual image dimensions? By looking at your FO source file and the RTF output, I have finally figured out what's wrong there. The problem doesn't lie in the image dimensions, which are correct, but in the paragraph attributes. As a matter of fact the block that contains the image inherits the 'line-height' property value ("1.5") set on the 'root' element. This non-default value results in a \sl (space between line) tag being output by XFC, that cause the image to be cropped. All this is simply normal, except that the way XFC uses the \sl tag is somewhat questionable. This tag may specify either an absolute value (to be honoured in all cases) or a conditional value to be used if it's greater than the tallest element in the line. XFC uses the former, that conforms to the XSL-FO specification but may not be a good choice. As the latter appears to be more appropriate in practice, it will be adopted in the next release. In the meantime, I've made a patch available on our site (http://www.pixware.fr/download/xfc.jar) to fix your problem. Regards, -- Jean-Yves Belmonte <john@pixware.fr> - Pixware <http://www.pixware.fr> Le Capricorne - 23 rue Colbert - 78180 Montigny-le-Bretonneux - France voice: +33 (0)1.30.60.07.00 - fax: +33 (0)1.30.96.05.23
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC