8

不久前,我发现 FOP 不允许您使用浮点数,以及 Xsl-Fo 1.0 中的一些其他功能。我尝试了几种不同的方法来模仿它们,但都没有成功。如果有人在这方面取得了成功,或者有想法。我真的很感激启蒙。

4

3 回答 3

1

http://xmlgraphics.apache.org/fop/compliance.html列出了 Apache FOP 支持哪些 XSL-FO 功能,哪些不支持。浮动尚未实施。

于 2009-07-24T06:13:39.670 回答
1

我知道这是一个老问题,但我遇到了同样的问题(我不能使用浮点数,也无法升级到可以使用浮点数的版本)。我最终决定在两个文本块之间保留一个图像,前面的文本块keep-with-next="always"和图像之后的文本keep-with-previous="always"

I found these examples online here. So the text doesn't wrap around the image, but it's above and below the image (it works for large images where text wouldn't wrap around the sides anyway, which was my case, and the preceding/following text isn't too much).

于 2017-01-06T14:35:45.903 回答
0

大约晚了 4 年,但我设法让一张桌子通过一点……诡计来浮动。

fo:table width="15cm"
fo:table-column column-width="7cm"/
fo:table-column column-width="3cm"/
fo:table-column column-width="5cm"/
fo:table-row
fo:table-cell border="none"
[Intentionally left blank]
/fo:table-cell
fo:table-cell border="solid"
[Content of 3cm column]
/fo:table-cell
fo:table-cell border="solid"
[Content of 5cm column]
/fo:table-cell
/fo:table-row
/fo:table

这绝不是一个优雅或可靠的解决方案,但值得记住,以防您需要专门对齐表格。一个类似的解决方案可能适用于一个空白块和另一个保持在同一行的块,但我没有在我自己的使用中测试过这个,所以你的结果会有所不同。

抱歉,我无法提供一般案例解决方案。

于 2013-07-29T16:30:08.990 回答