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

L

Lorentz

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
 
P

Paul A. Hoadley

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).

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.
 
L

Lorentz

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
 
L

Lorentz

Paul A. Hoadley said:
What formatter are you using? XEP renders that fragment correctly.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top