On 05/05/2011 04:23 PM, Bas van den Broek wrote: > But this is even happening when outside a table. See line6 and line7, > those are stand-alone and the problem occurs there too. > By the way, when you talk about this problem, are you referring to the > extra linebreaks or the fact that they have use a different font? >
I'm really sorry but I have nothing to add to my previous answer: * In the case of the sequence of nested blocks and tables you sent us, XFC happens to give you a certain output. * We agree that this output may be incorrect. * The bugs you have found *seem* to be deeply rooted in XFC implementation. * We currently don't see what we can do to improve the situation. * You'll have to find one or more workarounds by yourself. Yes, I know, this is not a helpful answer but it's the only one I can give you. > Kind regards, > > Bas van den Broek > > -----Original Message----- > From: Hussein Shafie [mailto:[email protected]] > Sent: Thursday, May 05, 2011 15:42 > To: Bas van den Broek > Cc: [email protected] > Subject: Re: [XFC] More linebreaks than expected, and with a different > font > > Bas van den Broek wrote: >> >> 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. >> > > I'm sorry but we don't see how to fix the problems you describe without > a major rewrite. It seems to be inherent to the way XFC generates tables > and we do not plan to change this implementation. I'm afraid you'll have > to find a workaround by yourself because we cannot suggest one. > > -- > XMLmind FO Converter Support List > [email protected] > http://www.xmlmind.com/mailman/listinfo/xfc-support > > -- XMLmind FO Converter Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xfc-support

