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

Discussion in 'XML' started by Lorentz, Feb 25, 2004.

  1. Lorentz

    Lorentz Guest

    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
    Lorentz, Feb 25, 2004
    #1
    1. Advertising

  2. On 25 Feb 2004 09:13:32 -0800, Lorentz <> wrote:

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


    --
    Paul.

    Logic Squad -- Technical Publishing with XML -- http://logicsquad.net/
    Paul A. Hoadley, Feb 26, 2004
    #2
    1. Advertising

  3. Lorentz

    Lorentz Guest

    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" <> wrote in message news:<>...
    > On 25 Feb 2004 09:13:32 -0800, Lorentz <> wrote:
    >
    > > 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.
    Lorentz, Feb 26, 2004
    #3
  4. On 26 Feb 2004 08:41:28 -0800, Lorentz <> wrote:

    > Unfortunately the code does not work.


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


    --
    Paul.

    Logic Squad -- Technical Publishing with XML -- http://logicsquad.net/
    Paul A. Hoadley, Feb 27, 2004
    #4
  5. Lorentz

    Lorentz Guest

    "Paul A. Hoadley" <> wrote in message news:<>...
    > On 26 Feb 2004 08:41:28 -0800, Lorentz <> wrote:
    >
    > > Unfortunately the code does not work.

    >
    > 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
    Lorentz, Feb 27, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joey
    Replies:
    2
    Views:
    977
  2. Replies:
    1
    Views:
    3,598
    A. Bolmarcich
    May 27, 2005
  3. Fro
    Replies:
    2
    Views:
    347
    Jonathan N. Little
    Apr 8, 2008
  4. Mothra
    Replies:
    10
    Views:
    474
    Anno Siegel
    Mar 11, 2005
  5. ela
    Replies:
    12
    Views:
    346
    Uri Guttman
    Apr 6, 2009
Loading...

Share This Page