XSL-FO fop. Long text flows into adjacent cells/block, obscuring stuff there

后端 未结 6 1525
灰色年华
灰色年华 2020-12-11 02:37

Could anyone suggest me a way to make long words (like serial numbers) to be wrapped? I tried some commercial software and there is no such issue. Is it a fop bug or probabl

6条回答
  •  [愿得一人]
    2020-12-11 02:48

    You can specify the wrap-option attribute in your fo:block like so:

     ... stuff 
    

    Here's the XSL-FO specification for this attribute:

    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".

    You can also define the wrap-option attribute in an fo:table-cell

     ... 
    

    and the fo:blocks within will inherit the property.

提交回复
热议问题