You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Florent Georges <da...@yahoo.fr> on 2007/02/01 12:14:28 UTC

Cell overflow: word too large

  Hi

  I just saw a strange overflow in a table cell.  The cell
contains two words, and the second word seems to being not
put on a new line if it is larger than the column width.
Here is a use case.  The second cell is a little bit less
large, then both words are kept on a single line, while in
the first cell the second word goes on a new line:

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="main">
      <fo:region-body margin="25pt"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="main">
    <fo:flow flow-name="xsl-region-body">
      <fo:table font-family="Helvetica" font-size="8pt"
                width="239.75pt" table-layout="fixed">
        <fo:table-column column-width="121pt"/>
        <fo:table-column column-width="118.75pt"/>
        <fo:table-body>
          <fo:table-row>
            <fo:table-cell border-style="solid" border-width="0.25pt">
              <fo:block start-indent="3pt" end-indent="3pt"
                >NIEUWE AUTOMOBIELMAATSCHAPPIJ</fo:block>
            </fo:table-cell>
            <fo:table-cell border-style="solid" border-width="0.25pt">
              <fo:block start-indent="3pt" end-indent="3pt"
                >NIEUWE AUTOMOBIELMAATSCHAPPIJ</fo:block>
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
      </fo:table>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

  Is it the expected behaviour?  Is there a way to force
breaking line even if the word is too large for the cell?

  Regards,

--drkm





















	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Cell overflow: word too large

Posted by Florent Georges <da...@yahoo.fr>.
Cheffe wrote:

> Since 0.93 on <fo:block> the attribute wrap-option='wrap' is
> supported i
> think. Give it a try

  Thank you for the response.  Unfortunately, that doesn't solve my
problem.  Actually, it is not surprising, as 'wrap' is the default
value in one hane, and in the other hand the problem arise only in a
specific case (one cell is well formated, but the other is not, where
the word to wrap is longer than the cell width).

  Regards,

--drkm






















	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Cell overflow: word too large

Posted by Cheffe <ni...@freenet.de>.
Hi Florent,
Since 0.93 on <fo:block> the attribute wrap-option='wrap' is supported i
think. Give it a try

W3C:
7.15.13 "wrap-option"
XSL Definition:

Value:  no-wrap | wrap | inherit 
Initial:  wrap 
Applies to:  fo:block, fo:inline, fo:page-number, fo:page-number-citation 
Inherited:  yes 
Percentages:  N/A 
Media:  visual 

Values have the following meanings:

no-wrap 
No line-wrapping will be performed.

In the case when lines are longer than the available width of the
content-rectangle, the overflow will be treated in accordance with the
"overflow" property specified on the reference-area.

wrap 
Line-breaking will occur if the line overflows the available block width. No
special markers or other treatment will occur. 

Specifies how line-wrapping (line-breaking) of the content of the formatting
object is to be handled.

Implementations must support the "no-wrap" value, as defined in this
Recommendation, when the value of "linefeed-treatment" is "preserve".




Florent Georges wrote:
> 
>   Hi
> 
>   I just saw a strange overflow in a table cell.  The cell
> contains two words, and the second word seems to being not
> put on a new line if it is larger than the column width.
> Here is a use case.  The second cell is a little bit less
> large, then both words are kept on a single line, while in
> the first cell the second word goes on a new line:
> 
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>   <fo:layout-master-set>
>     <fo:simple-page-master master-name="main">
>       <fo:region-body margin="25pt"/>
>     </fo:simple-page-master>
>   </fo:layout-master-set>
>   <fo:page-sequence master-reference="main">
>     <fo:flow flow-name="xsl-region-body">
>       <fo:table font-family="Helvetica" font-size="8pt"
>                 width="239.75pt" table-layout="fixed">
>         <fo:table-column column-width="121pt"/>
>         <fo:table-column column-width="118.75pt"/>
>         <fo:table-body>
>           <fo:table-row>
>             <fo:table-cell border-style="solid" border-width="0.25pt">
>               <fo:block start-indent="3pt" end-indent="3pt"
>                 >NIEUWE AUTOMOBIELMAATSCHAPPIJ</fo:block>
>             </fo:table-cell>
>             <fo:table-cell border-style="solid" border-width="0.25pt">
>               <fo:block start-indent="3pt" end-indent="3pt"
>                 >NIEUWE AUTOMOBIELMAATSCHAPPIJ</fo:block>
>             </fo:table-cell>
>           </fo:table-row>
>         </fo:table-body>
>       </fo:table>
>     </fo:flow>
>   </fo:page-sequence>
> </fo:root>
> 
>   Is it the expected behaviour?  Is there a way to force
> breaking line even if the word is too large for the cell?
> 
>   Regards,
> 
> --drkm
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 	
> 
> 	
> 		
> ___________________________________________________________________________ 
> Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions
> ! 
> Profitez des connaissances, des opinions et des expériences des
> internautes sur Yahoo! Questions/Réponses 
> http://fr.answers.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Cell-overflow%3A-word-too-large-tf3154245.html#a8747327
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Cell overflow: word too large

Posted by Florent Georges <da...@yahoo.fr>.
Andreas L Delmelle wrote:

  Hi

> The known workaround is to insert zero-width breaking spaces
> in the word at certain points.

  Unfortunately, it is not really a possible solution.  FO documents
are generated and in a lot of places we don't have any control on input
text (as the name of a supplier, for example).  Detecting all places
where it could be interesting to insert such spaces and actually insert
them could be very expensive (in both development time and processing
time).

> Activating hyphenation should also do the trick, IIC.

  I didn't think to hyphenation.  I just downloaded fop-hyph.jar and
did a few tests.  The result is quite good, but it seems to have a
strange interaction between hyphenation and linefeeds when
linefeed-treatment = "preserve".  I need to investigate a little bit
further.

  Thanks for the answer.  I know at least what I can expect and where
to look now.

  Regards,

--drkm






















	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Cell overflow: word too large

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Feb 1, 2007, at 12:14, Florent Georges wrote:

>   I just saw a strange overflow in a table cell.  The cell
> contains two words, and the second word seems to being not
> put on a new line if it is larger than the column width.
> Here is a use case.  The second cell is a little bit less
> large, then both words are kept on a single line, while in
> the first cell the second word goes on a new line:
> <snip />
> Is there a way to force
> breaking line even if the word is too large for the cell?

The known workaround is to insert zero-width breaking spaces in the  
word at certain points.
Activating hyphenation should also do the trick, IIC.

HTH!

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org