在XSL-FO中,可以使fo:块具有一个可以是实心或虚线的边框,等等。是否可以生成由星号(*)组成的边框?
*****************
* *
* some text *
* *
*****************发布于 2014-05-27 23:51:07
我一直这样做的SVG图像作为背景。你可以改变角落,侧面,顶部和底部的图像。基本上,在中间单元格的边框里放一张桌子,然后放在中间的单元格里,随你的意愿。如果您的模式可能被切断,您可能需要调整内部单元格一点。如下所示:
<fo:table>
<fo:table-column column-width="1pt"/>
<fo:table-column/>
<fo:table-column column-width="1pt"/>
<fo:table-body>
<!-- Put background behind this top row -->
<fo:table-row background-image="diamond.svg"
rx:background-content-height="scale-to-fit" background-repeat="repeat-x">
<fo:table-cell number-columns-spanned="3">
<fo:block line-height="1pt">
<fo:leader/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<!-- Put backround behind this left cell -->
<fo:table-cell background-image="diamond.svg"
rx:background-content-width="scale-to-fit"
background-repeat="repeat-y">
<fo:block>
<fo:leader/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<!-- Tweak height here -->
<fo:block-container margin-top="0.4pt" margin-bottom="0.4pt">
<fo:table text-align="center">
<fo:table-column column-width="100%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="center">
<fo:block margin="18pt"> Put all your content in
here. Put all your content in here. Put all your
content in here. Put all your content in here. Put
all your content in here. Put all your content in
here. Put all your content in here. Put all your
content in here. Put all your content in here. Put
all your content in here. Put all your content in
here. Put all your content in here. Put all your
content in here. Put all your content in here. Put
all your content in here. Put all your content in
here. Put all your content in here. Put all your
content in here. Put all your content in here. Put
all your content in here. Put all your content in
here. Put all your content in here. Put all your
content in here. Put all your content in here. Put
all your content in here. Put all your content in
here. Put all your content in here. Put all your
content in here. Put all your content in here. Put
all your content in here. Put all your content in
here. Put all your content in here. Put all your
content in here. Put all your content in here.
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block-container>
</fo:table-cell>
<!-- Put backround behind this right cell -->
<fo:table-cell background-image="diamond.svg"
rx:background-content-width="scale-to-fit"
background-repeat="repeat-y">
<fo:block>
<fo:leader/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<!-- Put background behind this bottom row -->
<fo:table-row background-image="diamond.svg"
rx:background-content-height="scale-to-fit" background-repeat="repeat-x">
<fo:table-cell number-columns-spanned="3">
<fo:block line-height="1pt">
<fo:leader/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>产生这样的东西:

https://stackoverflow.com/questions/23886809
复制相似问题