Connecting Tech Pros Worldwide Forums | Help | Site Map

XSL-FO - Formatting single line with different text-alignments

Lorentz
Guest
 
Posts: n/a
#1: Jul 20 '05
Greetings.

I have a process that takes data from a MS Access2000 database and
produces .pdf files. Everything works fine... but I'm trying to
format the header and footer of the pdf file so that the a line can
contain 2 tex-alignments (center and right). Thus far, I've had no
success in achieving this criteria. Does anyone have any
suggestions...?

Here's what I have so far (the result is on 2 separate lines):
<fo:static-content flow-name="xsl-region-before">
<fo:block font-family="Times" font-size="10pt" text-align="center">
Centered Text
</fo:block>
<fo:block font-family="Times" font-size="10pt" text-align="right">
Right Justified Text
</fo:block>
</fo:static-content>

If anyone can help, I appreciate the assistance.

Thank you in advance,
Lorentz

Paul A. Hoadley
Guest
 
Posts: n/a
#2: Jul 20 '05

re: XSL-FO - Formatting single line with different text-alignments


On 25 Feb 2004 09:13:32 -0800, Lorentz <tsosiel@hotmail.com> wrote:
[color=blue]
> I'm trying to format the header and footer of the pdf file so that
> the a line can contain 2 tex-alignments (center and right).[/color]

The simplest way is to use a leader:

<fo:block text-align-last="justify">
<xsl:text>Text on the left</xsl:text>
<fo:leader leader-pattern="space"/>
<xsl:text>Text on the right</xsl:text>
</fo:block>

You could also use a table.


--
Paul.

Logic Squad -- Technical Publishing with XML -- http://logicsquad.net/
Lorentz
Guest
 
Posts: n/a
#3: Jul 20 '05

re: XSL-FO - Formatting single line with different text-alignments


Thanks for the help Paul...

Unfortunately the code does not work. I cut and pasted your example
into my .xsl file and generated the pdf - the header information was
not complete. Here is what it produced:
Text on the

So... I'm not sure what I'm doing wrong. I will look into the table
option... but I'd rather format the line; seems easier...!

Thanks again.
-Lorentz
"Paul A. Hoadley" <paulh@logicsquad.net> wrote in message news:<slrnc3qnev.21fk.paulh@grover.logicsquad.net> ...[color=blue]
> On 25 Feb 2004 09:13:32 -0800, Lorentz <tsosiel@hotmail.com> wrote:
>[color=green]
> > I'm trying to format the header and footer of the pdf file so that
> > the a line can contain 2 tex-alignments (center and right).[/color]
>
> The simplest way is to use a leader:
>
> <fo:block text-align-last="justify">
> <xsl:text>Text on the left</xsl:text>
> <fo:leader leader-pattern="space"/>
> <xsl:text>Text on the right</xsl:text>
> </fo:block>
>
> You could also use a table.[/color]
Paul A. Hoadley
Guest
 
Posts: n/a
#4: Jul 20 '05

re: XSL-FO - Formatting single line with different text-alignments


On 26 Feb 2004 08:41:28 -0800, Lorentz <tsosiel@hotmail.com> wrote:
[color=blue]
> Unfortunately the code does not work.[/color]

What formatter are you using? XEP renders that fragment correctly.


--
Paul.

Logic Squad -- Technical Publishing with XML -- http://logicsquad.net/
Lorentz
Guest
 
Posts: n/a
#5: Jul 20 '05

re: XSL-FO - Formatting single line with different text-alignments


"Paul A. Hoadley" <paulh@logicsquad.net> wrote in message news:<slrnc3t86n.2rij.paulh@grover.logicsquad.net> ...[color=blue]
> On 26 Feb 2004 08:41:28 -0800, Lorentz <tsosiel@hotmail.com> wrote:
>[color=green]
> > Unfortunately the code does not work.[/color]
>
> What formatter are you using? XEP renders that fragment correctly.[/color]

Paul,

Thanks for your help and advice. I'm not sure what formatter we're
using... I ended up using tables... and I know this will be easier to
work with!

Thanks again,

Lorentz
Closed Thread