答案 0 :(得分:0)
对于空下划线,请使用带有底部边框的fo:leader
(https://www.w3.org/TR/xsl11/#fo_leader),例如:
<fo:block>Name:<fo:leader leader-length.optimum="100%" border-bottom="thin solid black"
/></fo:block>
<fo:block>Address:<fo:leader leader-length.optimum="100%"
border-bottom="thin solid black" /><fo:block /><fo:leader
leader-length.optimum="100%" border-bottom="thin solid black" /></fo:block>
对于文字下的长下划线,请将fo:inline
与inline-progression-dimension.optimum
和inline-progression-dimension.minimum
一起使用,以便fo:inline
不必占用宽度的100%:
<fo:block>Name:<fo:inline keep-with-previous.within-line="always"
inline-progression-dimension.minimum="12pt"
inline-progression-dimension.optimum="100%" border-bottom="thin solid black"
padding-left="12pt">RECEIVER NAME</fo:inline></fo:block>
<fo:block>Address:<fo:inline keep-with-previous.within-line="always"
inline-progression-dimension.minimum="12pt"
inline-progression-dimension.optimum="100%" border-bottom="thin solid black"
padding-left="12pt">RECEIVER STREET 1</fo:inline><fo:block /><fo:inline
keep-with-previous.within-line="always"
inline-progression-dimension.minimum="12pt"
inline-progression-dimension.optimum="100%" border-bottom="thin solid black"
padding-left="12pt">2, RECEIVER STREET 3</fo:inline></fo:block>
要使文本排成一行,如果您正在使用AH Formatter,请使用axf:tab
(https://www.antennahouse.com/product/ahf63/ahf-ext.html#axf.tab)和相关属性来设置和使用制表位:
<fo:flow flow-name="xsl-region-body" axf:tab-stops="20mm">
<fo:block>Name:<fo:inline keep-with-previous.within-line="always"
inline-progression-dimension.minimum="12pt"
inline-progression-dimension.optimum="100%" border-bottom="thin solid black"
><axf:tab />RECEIVER NAME</fo:inline></fo:block>
<fo:block>Address:<fo:inline keep-with-previous.within-line="always"
inline-progression-dimension.minimum="12pt"
inline-progression-dimension.optimum="100%" border-bottom="thin solid black"
><axf:tab />RECEIVER STREET 1</fo:inline><fo:block /><fo:inline
keep-with-previous.within-line="always"
inline-progression-dimension.minimum="12pt"
inline-progression-dimension.optimum="100%" border-bottom="thin solid black"
><axf:tab />RECEIVER STREET 2, RECEIVER STREET 3</fo:inline></fo:block>
</fo:flow>