Hi,

In some cases I'm getting more linebreaks than I would expect and they
also have a different font on that line, so the lines are even higher
than normal. This is the XSL I made as a test case:

<?xml version="1.0" encoding="UTF-8"?><fo:root
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <fo:layout-master-set>
    <fo:simple-page-master master-name="MyPage" page-height="11.693in"
page-width="8.268in">
      <fo:region-body margin-bottom="0.5in" margin-left="0.5in"
margin-right="0.5in" margin-top="0.5in"/>
      <fo:region-before display-align="before" extent="0.5in"
region-name="xsl-region-before"/>
      <fo:region-after display-align="after" extent="0.5in"
region-name="xsl-region-after"/>
      <fo:region-start extent="0.5in"/>
      <fo:region-end extent="0.5in"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="MyPage">
    <fo:flow flow-name="xsl-region-body">
      <fo:block color="#000000" font-family="helvetica" font-size="9pt"
font-style="normal" font-weight="normal">
        <fo:table border-collapse="separate" border-spacing="0pt"
padding="0pt" table-layout="fixed" text-align="left" width="100%">
          <fo:table-column column-width="100%"/>
          <fo:table-body>
            <fo:table-row>
              <fo:table-cell display-align="before" text-align="left">
                <fo:block white-space-collapse="false"
wrap-option="wrap">
                  <fo:block linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="wrap">Line1</fo:block>
                </fo:block>
              </fo:table-cell>
            </fo:table-row>
            <fo:table-row>
              <fo:table-cell display-align="before" text-align="left">
                <fo:block white-space-collapse="false"
wrap-option="wrap"/>
              </fo:table-cell>
            </fo:table-row>
            <fo:table-row>
              <fo:table-cell display-align="before" text-align="left">
                <fo:block white-space-collapse="false"
wrap-option="wrap">
                  <fo:block linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="wrap">Line2</fo:block>
                </fo:block>
              </fo:table-cell>
            </fo:table-row>
            <fo:table-row>
              <fo:table-cell display-align="before" text-align="left">
                <fo:block white-space-collapse="false"
wrap-option="wrap">
                  <fo:block linefeed-treatment="preserve"/>
                </fo:block>
              </fo:table-cell>
            </fo:table-row>
            <fo:table-row>
              <fo:table-cell display-align="before" text-align="left">
                <fo:block white-space-collapse="false"
wrap-option="wrap">
                  <fo:block linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="wrap">Line3</fo:block>
                </fo:block>
              </fo:table-cell>
            </fo:table-row>
          </fo:table-body>
        </fo:table>
        <fo:block>
          <fo:table border-collapse="separate" border-spacing="0pt"
padding="0pt" table-layout="fixed" text-align="left" width="100%">
            <fo:table-column column-width="100%"/>
            <fo:table-body>
              <fo:table-row>
                <fo:table-cell display-align="before" text-align="left">
                  <fo:block white-space-collapse="false"
wrap-option="wrap">
                    <fo:block linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="wrap">Line4</fo:block>
                  </fo:block>
                </fo:table-cell>
              </fo:table-row>
              <fo:table-row>
                <fo:table-cell display-align="before" text-align="left">
                  <fo:block white-space-collapse="false"
wrap-option="wrap">
                    <fo:block linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="wrap"/>
                  </fo:block>
                </fo:table-cell>
              </fo:table-row>
              <fo:table-row>
                <fo:table-cell display-align="before" text-align="left">
                  <fo:block white-space-collapse="false"
wrap-option="wrap">
                    <fo:block linefeed-treatment="preserve"
white-space-collapse="false" wrap-option="wrap">Line5</fo:block>
                  </fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-body>
          </fo:table>
        </fo:block>
        <fo:block text-align="left">Line6</fo:block>
        <fo:block linefeed-treatment="preserve"/>
        <fo:block text-align="left">Line7</fo:block>
        <fo:block id="terminator"/>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

I'm using the latest XFC library.

Attached is the generated docx file.

Between line 1 and 2 I wasn't sure what to expect, either no or 1
linebreak. XFC inserts 1. Apache FOP inserts none. 
Between line 2 and 3 I was expecting 1 linebreak but not 2. XFC inserts
2. Apache FOP inserts 1.
Between line 4 and 5 I wasn't sure what to expect either, either no or 1
linebreak. XFC inserts 1. Apache FOP inserts none.
Between line 6 and 7 I was expecting 1 linebreak but not 2. XFC inserts
2. Apache FOP inserts 1.

Also, the font on the lines where XFC inserts an additional line is
different. I'd expect Helvetica everywhere but it is actually Calibri
(body) at size 11, which may be a default for Word or something. This
makes the lines higher because of the different size of the font.

So my question, is it correct that XFC is inserting more linebreaks? I
guess this has to do with how an fo:block is treated. And what to do
about the font problem? This looks like a bug.


Kind regards,

Bas van den Broek

Attachment: 27.docx
Description: 27.docx

 
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support

Reply via email to