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 "Larkin, Rob" <Ro...@analog.com> on 2007/03/16 13:37:49 UTC
Alignment Issue in Header (Win32)
Hi,
I'm seeing a issue with the text-align attribute being ignored in
headers. For example (from pdfoutline.fo in the examples directory):
<fo:static-content flow-name="xsl-region-before">
<fo:block>
<fo:inline text-align="start" font-size="10pt" font-family="serif"
line-height="14pt" color="blue" >
This is not the latest Fop documentation, but just an fo example.
</fo:inline>
<fo:inline text-align="end" font-size="10pt" font-family="serif"
line-height="14pt" color="blue" >
Page <fo:page-number/>
</fo:inline>
</fo:block>
</fo:static-content>
This should align "...not the latest FOP documentation" to the left and
the page numbers to the right. In the pdf they are both aligned too the
left. If I split it into two blocks then each inline element aligns
correctly but they are now on different lines! How do I stop inline
elements inheriting the alignment form the parent block?
Thanks,
Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Alignment Issue in Header (Win32)
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Mar 16, 2007, at 13:37, Larkin, Rob wrote:
> I'm seeing a issue with the text-align attribute being ignored in
> headers. For example (from pdfoutline.fo in the examples directory):
>
> <fo:static-content flow-name="xsl-region-before">
> <fo:block>
> <fo:inline text-align="start" font-size="10pt" font-family="serif"
> line-height="14pt" color="blue" >
> This is not the latest Fop documentation, but just an fo example.
> </fo:inline>
> <fo:inline text-align="end" font-size="10pt" font-family="serif"
> line-height="14pt" color="blue" >
> Page <fo:page-number/>
> </fo:inline>
> </fo:block>
> </fo:static-content>
>
> This should align "...not the latest FOP documentation" to the left
> and
> the page numbers to the right.
Nope, FOP is perfectly compliant here.
Explanation: text-align is not applicable to an fo:inline. An
fo:inline ALWAYS inherits the text-align properties from the ancestor
fo:block (in this case the default value of "start").
[Note: An interesting side-effect that may be difficult to grasp is
that any fo:block nested in the fo:inline will inherit the value
specified on the fo:inline.]
FOP cannot warn you about this, because it is perfectly legal to
specify non-applicable properties (mainly used to take advantage of
property inheritance)
Solution: the quickest way to achieve the effect you're after, is
probably to use an fo:table.
HTH!
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Alignment Issue in Header (Win32)
Posted by "Larkin, Rob" <Ro...@analog.com>.
Thanks for that example, that is a much cleaner solution.
With regards to my example, it was cut and pasted straight from a file in the installed directory. I'm at a different machine machine now but I think it was 'outline' something in the fo/basic directory.
Rob
-----Original Message-----
From: Andreas L Delmelle [mailto:a_l.delmelle@pandora.be]
Sent: Fri 16/03/2007 20:47
To: fop-users@xmlgraphics.apache.org
Subject: Re: Alignment Issue in Header (Win32)
On Mar 16, 2007, at 21:16, Andreas L Delmelle wrote:
> Hi Rob,
>
>> I'm seeing a issue with the text-align attribute being ignored in
>> headers. For example (from pdfoutline.fo in the examples directory):
>
> Shortly after my previous reply, I went looking for this example to
> correct it, but I didn't seem to find the fragment you posted...
>
> Is it correct that you altered the example for the purposes of your
> post?
Also, I indicated that an fo:table would be a solution for you, but
it just occurred to me that the cleanest and simplest solution would
be something like:
<fo:block text-align="start" text-align-last="justify">
Start-aligned text
<fo:leader leader-pattern="space" />
Page <fo:page-number />
</fo:block>
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Alignment Issue in Header (Win32)
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Mar 16, 2007, at 21:16, Andreas L Delmelle wrote:
> Hi Rob,
>
>> I'm seeing a issue with the text-align attribute being ignored in
>> headers. For example (from pdfoutline.fo in the examples directory):
>
> Shortly after my previous reply, I went looking for this example to
> correct it, but I didn't seem to find the fragment you posted...
>
> Is it correct that you altered the example for the purposes of your
> post?
Also, I indicated that an fo:table would be a solution for you, but
it just occurred to me that the cleanest and simplest solution would
be something like:
<fo:block text-align="start" text-align-last="justify">
Start-aligned text
<fo:leader leader-pattern="space" />
Page <fo:page-number />
</fo:block>
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Alignment Issue in Header (Win32)
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Mar 16, 2007, at 13:37, Larkin, Rob wrote:
Hi Rob,
> I'm seeing a issue with the text-align attribute being ignored in
> headers. For example (from pdfoutline.fo in the examples directory):
Shortly after my previous reply, I went looking for this example to
correct it, but I didn't seem to find the fragment you posted...
Is it correct that you altered the example for the purposes of your
post?
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org