Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XSL FO inline alignment

Tags:

pdf

xsl-fo

I need to get text aligned right and left on the same line. This should be possible, but i can't seem to find a way. I'm using Apache FOP to convert xml to pdf.

Can someone help me to get this right?

like image 580
Ikke Avatar asked Dec 24 '08 16:12

Ikke


1 Answers

This will do the trick:

<fo:table>
  <fo:table-column />
  <fo:table-column />

  <fo:table-body>
    <fo:table-row>
      <fo:table-cell>
        <fo:block>LEFT TEXT</fo:block>
      </fo:table-cell>
      <fo:table-cell>
        <fo:block text-align="right">RIGHT TEXT</fo:block>
      </fo:table-cell>
    </fo:table-row>
  </fo:table-body>
</fo:table>
like image 153
Hilton Campbell Avatar answered Oct 26 '22 12:10

Hilton Campbell