title: XSL-FO - Center Text not working
body: <p>In my XSL-FO, I am having problems centering text as it breaks the footnote-line2 into 2 sentences as opposed to going the full length of the page and then breaking the sentence once it runs out of room. See graphics below.</p>
  
  <p>I have this code:</p>
  
  <pre><code>    &lt;fo:block font-size="9pt" text-align="center"&gt;
          &lt;xsl:value-of select="footnote-line1"/&gt;
      &lt;/fo:block&gt;
      &lt;fo:block font-size="9pt" text-align="center"&gt;
          &lt;xsl:value-of select="footnote-line2"/&gt;
      &lt;/fo:block&gt;  
  </code></pre>
  
  <p>Here is my XML: </p>
  
  <pre><code>    &lt;footnote-line1&gt;This verification of XXXXXX is self-generated and is produced by John Smith from our secure website.&lt;/footnote-line1&gt;
      &lt;footnote-line2&gt;If there are any questions regarding the information contained in this letter, you may contact the Joe Blow at his office at the contact information noted above.&lt;/footnote-line2&gt;
  </code></pre>
  
  <p>Which generates this output:<img src="https://i.stack.imgur.com/OvPuz.png" alt="enter image description here">:</p>
  
  <p>Unfortunately, the above image is not what I want as it is doing a paragraph break after the word "you".</p>
  
  <p>This 2 images below are the output I am hoping to get. The first image I achieved that was by shrinking down the font to 6pt, but I don't want to shrink the font down.</p>
  
  <p>Option 1) Alternate solution, but would rather not shrink down the font size</p>
  
  <p><img src="https://i.stack.imgur.com/coomi.png" alt="enter image description here"></p>
  
  <p>Option 2) Optimal solution without shrinking the font</p>
  
  <p><img src="https://i.stack.imgur.com/UPP6u.png" alt="enter image description here"></p>
  
  <p>How would I achieve option #2?</p>
  
  <p>Updated with colored backgrounds and both are the same length for the first and second footnotes:
  <img src="https://i.stack.imgur.com/sYpaZ.png" alt="enter image description here"></p>
  
  <p>Here is the full XSL-FO document:</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
      &lt;xsl:output method="xml" version="1.0" indent="yes" encoding="UTF-8"/&gt;
      &lt;xsl:output indent="yes"/&gt;
      &lt;xsl:template match="/"&gt;
          &lt;fo:root font-family="Times Roman" font-size="9pt"&gt;
              &lt;fo:layout-master-set&gt;
                  &lt;fo:simple-page-master master-name="main-voe"
                      margin-top="15mm" margin-bottom="15mm" margin-left="25mm" margin-right="25mm" page-width="215mm" page-height="279mm"&gt;
                      &lt;fo:region-body margin-top="1.0in" margin-bottom="1.0in"/&gt;
                      &lt;fo:region-before extent="1.0in" margin-top="1.0in"/&gt;
                  &lt;/fo:simple-page-master&gt;
              &lt;/fo:layout-master-set&gt;
              &lt;fo:page-sequence master-reference="main-voe" initial-page-number="1"&gt;
                  &lt;fo:static-content flow-name="xsl-region-before" font-size="9pt"&gt;
                      &lt;fo:block&gt;
                          &lt;xsl:apply-templates select="enrolment/address-dept-info"/&gt;
                      &lt;/fo:block&gt;
                  &lt;/fo:static-content&gt;
                  &lt;fo:flow flow-name="xsl-region-body" font-size="9pt"&gt;
                      &lt;fo:block font-weight="bold" linefeed-treatment="preserve" space-after="9pt"&gt;
                          &lt;xsl:apply-templates select="enrolment/letter"/&gt;
                      &lt;/fo:block&gt;
                      &lt;fo:block linefeed-treatment="preserve" font-weight="bold" space-after="9pt"&gt;
                          Notes:      
                      &lt;/fo:block&gt;
                       &lt;xsl:apply-templates select="enrolment/student-info/student-notes/student-notes-details"/&gt;
                      &lt;xsl:apply-templates select="enrolment/signature"/&gt;
                  &lt;/fo:flow&gt;
              &lt;/fo:page-sequence&gt;
          &lt;/fo:root&gt;
      &lt;/xsl:template&gt;
          &lt;!-- This sections builds the header information at the top of the page  --&gt;
      &lt;xsl:template match="address-dept-info"&gt;
          &lt;fo:table table-layout="fixed" width="100%"&gt;
              &lt;fo:table-column column-width="25mm" padding="0"/&gt;
              &lt;fo:table-column column-width="100mm"/&gt;
              &lt;fo:table-column column-width="85mm"/&gt;
              &lt;fo:table-body&gt;
                  &lt;fo:table-row&gt;
                      &lt;fo:table-cell&gt;
                          &lt;fo:block&gt;
                              Logo info
                          &lt;/fo:block&gt;                        
                      &lt;/fo:table-cell&gt;
                      &lt;fo:table-cell&gt;
                          &lt;fo:block linefeed-treatment='preserve'
                              white-space-collapse='false'&gt;&lt;xsl:value-of select="address1"/&gt;&lt;/fo:block&gt;
                          &lt;fo:block linefeed-treatment='preserve'
                              white-space-collapse='false'&gt;&lt;xsl:value-of select="address2"/&gt;&lt;/fo:block&gt;
                      &lt;/fo:table-cell&gt;
                      &lt;fo:table-cell&gt;
                          &lt;fo:block linefeed-treatment='preserve'
                              white-space-collapse='false'&gt;
                              &lt;xsl:value-of select="dept/dept-name"/&gt;
                          &lt;/fo:block&gt;
                      &lt;/fo:table-cell&gt;
                  &lt;/fo:table-row&gt;
              &lt;/fo:table-body&gt;
          &lt;/fo:table&gt;       
      &lt;/xsl:template&gt;
      &lt;xsl:template match="student-info"&gt;
          &lt;fo:block linefeed-treatment="preserve" space-after="9pt"&gt;
              &lt;fo:table table-layout="fixed" width="100%"&gt;
                  &lt;fo:table-column column-width="5mm"/&gt;
                  &lt;fo:table-column column-width="80mm"/&gt;
                  &lt;fo:table-column column-width="100mm"/&gt; 
                  &lt;fo:table-body&gt;
                      &lt;xsl:apply-templates select="//student-info/student-program/student-program-details"/&gt;
                  &lt;/fo:table-body&gt;    
              &lt;/fo:table&gt;
          &lt;/fo:block&gt;
      &lt;/xsl:template&gt;
      &lt;xsl:template match="student-notes/student-notes-details"&gt;
          &lt;xsl:value-of select="description"/&gt;
      &lt;/xsl:template&gt;    
      &lt;xsl:template match="signature"&gt;
          &lt;fo:block linefeed-treatment='preserve' space-after="9pt"&gt;
              Sincerely,
          &lt;/fo:block&gt; 
          &lt;fo:block linefeed-treatment='preserve' space-after="12pt"&gt;
              &lt;xsl:value-of select="first-name"/&gt;&lt;xsl:text&gt; &lt;/xsl:text&gt; &lt;xsl:value-of select="last-name"/&gt;&lt;xsl:text&gt;&amp;#10;&lt;/xsl:text&gt;
              &lt;xsl:value-of select="position"/&gt;&lt;xsl:text&gt;&amp;#10;&lt;/xsl:text&gt;
          &lt;/fo:block&gt;
          &lt;fo:block font-size="9pt" text-align="center" background-color="grey"&gt;
              &lt;xsl:value-of select="//letter/footnote-line1"/&gt;
          &lt;/fo:block&gt;
          &lt;fo:block font-size="9pt" text-align="center" background-color="yellow"&gt;
                  &lt;xsl:value-of select="//letter/footnote-line2"/&gt;
          &lt;/fo:block&gt;
      &lt;/xsl:template&gt; 
      &lt;xsl:template match="letter"&gt;
          &lt;fo:block linefeed-treatment='preserve' text-align="center"&gt;
              &lt;xsl:value-of select="title"/&gt;
          &lt;/fo:block&gt;
      &lt;/xsl:template&gt; 
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>Thanks
  Cheers</p>