开发者

XSL-FO: Render an element which stretches from the current position to the end of current line

I have an application which stores data in xml and generates PDF using xsl-fo.

I'm trying to find out is there a way to render an element with a width from the last element position to the end of current line. For example:

(page left)_______________________________________(page right)

       blablablablabla[      our element      ]
       blablablablablablablablablablablablablab
       blablablablablablablablablablablablablab
       blabl[           our element           ]
       blablablablablablablablab开发者_开发百科lablablablablab
       blablablablablablablablablablablablablab

Can anyone share some examples of how can this be implemented?

Thanks in advance :)


You can use fo:leader to add stretchable space:

<fo:block text-align-last="justify">
 blablablablabla[<fo:leader/>our element<fo:leader/>]
</fo:block>
<fo:block text-align-last="justify">
 blabl[<fo:leader/>our element<fo:leader/>]
</fo:block>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜