I am sorry that I can not offer much in the way of encouragement. When I use
the TXTRenderer it is only to create a plain text searchable file for an
archive system. Appearance is not a major concern.

Internally the TXTRenderer maps the character positions from the FOP area
tree onto a fixed space buffer. Theoretically it should be possible to set
the FOP parameters so that the characters that FOP produces would fall
exactly on the TXTRenderer grid. Practically, there seems to be enough chaos
to make this nearly impossible to achieve. Obviously FOP needs to be using a
fixed space font (eg. Courier). The LPI and CPI on the text renderer should
be set to match the spacing in the layout.

For Courier the relationship between the font height (points) and pitch
(CPI) is something like:

        height = 120/pitch

HTH,
Art

-----Original Message-----
From: Randall J. Parr [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 12:54 PM
To: [EMAIL PROTECTED]
Subject: FOP TXTRenderer example?


I have been trying to get the FOP TXTRenderer working
to produce some simple ASCII reports but have been
singularily unable to get any kind of decent result.

I am trying to use FOP TXTRenderer
(as opposed to just XSLT text output)
because I have to wrap some relatively long descriptions
and I have to right justify some columns.
I have not been able to find much help in doing either from within XSLT.

I get results (fop is working fine) but no matter how
I vary the parameters I always get lots of extra whitespace
between the words.

Is there some reasonable set of font, margins, etc. that will
produce a more-or-less non-justified plain text paragraph?

Does anyone have any simple examples?

=====================================================

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>

<fo:layout-master-set>
        <fo:simple-page-master 
                master-name="only"
                page-height="999999in"
                page-width="8.5in"
                margin-top="0in"
                margin-bottom="0in" 
                margin-left="0in" 
                margin-right="0in" 
        >
                <fo:region-body/>
        </fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-name="only">
        <fo:flow flow-name="xsl-region-body">
                <fo:block font-size="10pt" font-family="Courier" 
                        text-align="start" white-space-collapse="false" >
                <!-- space-treatment="ignore" not implimented yet -->
                This is my block of text
                that goes accross multiple lines, etc.
                </fo:block>
        </fo:flow>
</fo:page-sequence>

</fo:root>

=====================================================================
This  is   my  block   of  text   that   goes   accross    multiple
lines,   etc.

=====================================================================

Thank
R.Parr
Temporal Arts



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to