You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Kevin <go...@gmail.com> on 2005/05/30 19:33:25 UTC
a problem of FOP
Now I'm using Fop 0.20.5. I want to using the following fo to generate a pdf
document:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
<fo:layout-master-set>
<fo:simple-page-master master-name="test-page-master"
page-width="8.5in" page-height="11in">
<fo:region-body margin-top="0.4in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="test-page-master">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="gray"> This element is unstyled
save for a background color of gray. However, it contains an
<fo:inline background-color="red"
padding-right="80pt">inline element of padding-right 80pt and
background-color of red</fo:inline>, which should result in 80pt right
padding, in the last line in which the inline box appears.
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
I think the resulting pdf document should be like this:
But I failed, the resulting pdf document is like:
Why I cannot set the sub-background-color within a line? What should I do to
show different background color in a line???
Thanks for your patience to answer my question.
Re: a problem of FOP
Posted by Luke <lu...@lukeshannon.com>.
You could also try defining the back-ground colour in the region-body definition and than over ridding it with the inline tags.
Luke
Luke Shannon
Web Design/Development
Java Programmer
http://www.lukeshannon.com
phone: 416-570-1984
----- Original Message -----
From: Luke
To: fop-users@xmlgraphics.apache.org
Sent: Monday, May 30, 2005 3:10 PM
Subject: Re: a problem of FOP
Hi Kevin;
Not sure why that won't work. It looks right. Some dimensions for the page can't hurt. Perhaps there are issues calculating the 80pt padding without previously defined dimensions.
Sorry I can't be of more help,
Luke
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
<fo:layout-master-set>
<fo:simple-page-master master-name="test-page-master"
page-height="21cm"
page-width="29.7cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin right="2.5cm">
<fo:region-body
margin-top="3cm"
margin-bottom="1.5cm" />
<fo:region-before extent="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="test-page-master">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="blue"> This element is unstyled save for a background color of gray. However, it contains an
<fo:inline background-color="red" padding-right="80pt">inline element of padding-right 80pt and background-color of red</fo:inline>, which should result in 80pt right padding, in the last line in which the inline box appears.
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
----- Original Message -----
From: Kevin
To: fop-users@xmlgraphics.apache.org
Sent: Monday, May 30, 2005 1:33 PM
Subject: a problem of FOP
Now I'm using Fop 0.20.5. I want to using the following fo to generate a pdf document:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
<fo:layout-master-set>
<fo:simple-page-master master-name="test-page-master" page-width="8.5in" page-height="11in">
<fo:region-body margin-top="0.4in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="test-page-master">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="gray"> This element is unstyled save for a background color of gray. However, it contains an
<fo:inline background-color="red" padding-right="80pt">inline element of padding-right 80pt and background-color of red</fo:inline>, which should result in 80pt right padding, in the last line in which the inline box appears.
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
I think the resulting pdf document should be like this:
But I failed, the resulting pdf document is like:
Why I cannot set the sub-background-color within a line? What should I do to show different background color in a line???
Thanks for your patience to answer my question.
Re: a problem of FOP
Posted by Jeremias Maerki <de...@greenmail.ch>.
The problem is that background-color is not supported on fo:inline in
FOP 0.20.5. However, it already works in FOP 1.0dev (first preview
release later this year, source code available for adventurous people
already today through CVS).
On 30.05.2005 21:10:18 Luke wrote:
> Hi Kevin;
>
> Not sure why that won't work. It looks right. Some dimensions for the
> page can't hurt. Perhaps there are issues calculating the 80pt padding
> without previously defined dimensions.
>
> Sorry I can't be of more help,
>
> Luke
>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
> <fo:layout-master-set>
> <fo:simple-page-master master-name="test-page-master"
> page-height="21cm"
> page-width="29.7cm"
> margin-top="1cm"
> margin-bottom="2cm"
> margin-left="2.5cm"
> margin right="2.5cm">
> <fo:region-body
> margin-top="3cm"
> margin-bottom="1.5cm" />
> <fo:region-before extent="3cm"/>
> <fo:region-after extent="1.5cm"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="test-page-master">
> <fo:flow flow-name="xsl-region-body">
> <fo:block background-color="blue"> This element is unstyled save for a background color of gray. However, it contains an
> <fo:inline background-color="red" padding-right="80pt">inline element of padding-right 80pt and background-color of red</fo:inline>, which should result in 80pt right padding, in the last line in which the inline box appears.
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
>
> ----- Original Message -----
> From: Kevin
> To: fop-users@xmlgraphics.apache.org
> Sent: Monday, May 30, 2005 1:33 PM
> Subject: a problem of FOP
>
>
> Now I'm using Fop 0.20.5. I want to using the following fo to generate a pdf document:
>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
> <fo:layout-master-set>
> <fo:simple-page-master master-name="test-page-master" page-width="8.5in" page-height="11in">
> <fo:region-body margin-top="0.4in"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="test-page-master">
> <fo:flow flow-name="xsl-region-body">
> <fo:block background-color="gray"> This element is unstyled save for a background color of gray. However, it contains an
> <fo:inline background-color="red" padding-right="80pt">inline element of padding-right 80pt and background-color of red</fo:inline>, which should result in 80pt right padding, in the last line in which the inline box appears.
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
>
> I think the resulting pdf document should be like this:
>
> But I failed, the resulting pdf document is like:
>
> Why I cannot set the sub-background-color within a line? What should I do to show different background color in a line???
> Thanks for your patience to answer my question.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: a problem of FOP
Posted by Luke <lu...@lukeshannon.com>.
Hi Kevin;
Not sure why that won't work. It looks right. Some dimensions for the page can't hurt. Perhaps there are issues calculating the 80pt padding without previously defined dimensions.
Sorry I can't be of more help,
Luke
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
<fo:layout-master-set>
<fo:simple-page-master master-name="test-page-master"
page-height="21cm"
page-width="29.7cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin right="2.5cm">
<fo:region-body
margin-top="3cm"
margin-bottom="1.5cm" />
<fo:region-before extent="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="test-page-master">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="blue"> This element is unstyled save for a background color of gray. However, it contains an
<fo:inline background-color="red" padding-right="80pt">inline element of padding-right 80pt and background-color of red</fo:inline>, which should result in 80pt right padding, in the last line in which the inline box appears.
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
----- Original Message -----
From: Kevin
To: fop-users@xmlgraphics.apache.org
Sent: Monday, May 30, 2005 1:33 PM
Subject: a problem of FOP
Now I'm using Fop 0.20.5. I want to using the following fo to generate a pdf document:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
<fo:layout-master-set>
<fo:simple-page-master master-name="test-page-master" page-width="8.5in" page-height="11in">
<fo:region-body margin-top="0.4in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="test-page-master">
<fo:flow flow-name="xsl-region-body">
<fo:block background-color="gray"> This element is unstyled save for a background color of gray. However, it contains an
<fo:inline background-color="red" padding-right="80pt">inline element of padding-right 80pt and background-color of red</fo:inline>, which should result in 80pt right padding, in the last line in which the inline box appears.
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
I think the resulting pdf document should be like this:
But I failed, the resulting pdf document is like:
Why I cannot set the sub-background-color within a line? What should I do to show different background color in a line???
Thanks for your patience to answer my question.