使用 XSL FO 在同一行中左对齐和居中对齐 [英] left and center aligning in same line using XSL FO

查看:43
本文介绍了使用 XSL FO 在同一行中左对齐和居中对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在另一篇帖子中看到了这一点,

I saw this in another post,

<fo:block text-align-last="justify"> 
   LEFT TEXT
<fo:leader leader-pattern="space" />
   RIGHT TEXT
</fo:block>     

但我希望右侧的文本与同一行的中心对齐.我正在使用 Apache FOP 从 xml 生成 PDF.任何帮助,将不胜感激!

But i want the RIGHT TEXT to be aligned to center of the same line. I am using Apache FOP to generate PDF from xml. Any help would be appreciated!

推荐答案

使用单行、三列的表格,列宽为 30-40-30 或任何您需要容纳文本宽度的表格.仅将内容放在前两个单元格中,并将它们的对齐方式分别设置为左对齐和居中.

Use a one row, three column table with column widths like 30-40-30 or whatever you need to accommodate the text widths. Put the content in the first two cells only and set the alignment on them to left and center respectively.

这篇关于使用 XSL FO 在同一行中左对齐和居中对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆