left and center aligning in same line using XSL FO

☆樱花仙子☆ 提交于 2021-01-28 22:09:15

问题


I saw this in another post,

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

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!


回答1:


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.



来源:https://stackoverflow.com/questions/23948738/left-and-center-aligning-in-same-line-using-xsl-fo

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!