Re: Is there someone who use FOP ?

Subject: Re: Is there someone who use FOP ?
From: "James Tauber" <jtauber@xxxxxxxxxxx>
Date: Fri, 16 Jul 1999 09:23:03 +0800
----- Original Message -----
From: Gerald Colin <gcolin@xxxxxxxxxxxxx>


> I mean that I can't get the conversion to PDF to work. In fact I'd like to
> use the fo:list and I know that's new in FOP. So I ask to everyone if
> someone has ever used it.

I've included below a short example of a formatting object tree that
includes a list. It works fine for me with FOP 0.8.0 (i've introduced a bug
in 0.8.1 which I won't release until the bug is fixed)

Note that FOP currently miscalculates the amount of space in the block
progression direction that a list item takes up so you'll get incorrect page
breaks. This will be fixed in 0.8.1

> In fact I'd like to make tables.

FOP doesn't support tables yet but it is on my list :-)

Here is the fot file:

<fo:root xmlns:fo="http://www.w3.org/XSL/Format/1.0";>
<fo:layout-master-set>
<fo:simple-page-master page-master-name="one" margin-left="100pt"
margin-right="100pt">
<fo:region-body margin-top="50pt" margin-bottom="50pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence>
<fo:sequence-specification>
<fo:sequence-specifier-repeating page-master-first="one"
page-master-repeating="one"/>
</fo:sequence-specification>
<fo:flow font-size="14pt" line-height="14pt">
<fo:block font-size="24pt" line-height="28pt">Welcome to FOP</fo:block>
<fo:block space-before.optimum="12pt" text-align="justify">This is an
example of <fo:inline-sequence font-weight="bold">FOP</fo:inline-sequence>,
an XSL formatter by James Tauber. It is early days, but FOP is increasingly
supporting more and more formatting objects.</fo:block>
<fo:block text-align="justify" space-before.optimum="12pt">What follows is a
list.</fo:block>
<fo:list-block space-before.optimum="6pt">
<fo:list-item
space-before.optimum="12pt"><fo:list-item-label><fo:block>1.</fo:block></fo:
list-item-label><fo:list-item-body><fo:block text-align="justify">This is
item one. It is going to go for a little longer to see if this
list-item-body correctly wraps. There, that should be
enough.</fo:block></fo:list-item-body></fo:list-item>
<fo:list-item
space-before.optimum="12pt"><fo:list-item-label><fo:block>2.</fo:block></fo:
list-item-label><fo:list-item-body><fo:block text-align="justify">This is
item two. It has two blocks in the body. This is the
first.</fo:block><fo:block text-align="justify">This is the
second.</fo:block></fo:list-item-body></fo:list-item>
<fo:list-item
space-before.optimum="12pt"><fo:list-item-label><fo:block>3.</fo:block></fo:
list-item-label><fo:list-item-body><fo:block text-align="justify">This is
item three.</fo:block></fo:list-item-body></fo:list-item>
</fo:list-block>
<fo:block text-align="justify" space-before.optimum="12pt">This is an
example of FOP. This paragraph has to be long enough that it wraps so I can
test out text-align. That means I have to keep going and going until I get
at least a few lines to play with. I wonder if that's enough. Let me go and
check. This is an example of FOP. This paragraph has to be long enough that
it wraps so I can test out text-align. That means I have to keep going and
going until I get at least a few lines to play with. I wonder if that's
enough. Let me go and check.</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread