这是在黑暗中拍摄的,但有没有办法根据fo:block
高度设置svg rect高度?
我有一个设计,客户认为静态图形可以在文本包装的fo:table-row
中缩放。静态图形具有非常特殊的形状。
我试图找到一个解决方案,根据它的父母来缩放图形高度。
答案 0 :(得分:2)
如果您尝试在表格单元格中放置一个缩放的背景图像(问题不清楚)......您可以使用RenderX XEP及其背景图像扩展名来实现。
请参阅http://www.renderx.com/reference.html#Background_Image
示例:
<fo:table>
<fo:table-column column-width="1in"/>
<fo:table-column column-width="1in"/>
<fo:table-column column-width="1in"/>
<fo:table-body>
<fo:table-row >
<fo:table-cell>
<fo:block background-repeat="no-repeat" background-position="center center" background-image="circles1.svg" rx:background-content-height="scale-to-fit" rx:background-content-width="scale-to-fit" rx:background-scaling="non-uniform">This is some flowing stuff. This is some flowing stuff. This is some flowing stuff. This is some flowing stuff. </fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block background-repeat="no-repeat" background-position="center center" background-image="circles1.svg" rx:background-content-height="scale-to-fit" rx:background-content-width="scale-to-fit" rx:background-scaling="non-uniform">This is some flowing stuff. </fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block background-repeat="no-repeat" background-position="center center" background-image="circles1.svg" rx:background-content-height="scale-to-fit" rx:background-content-width="scale-to-fit" rx:background-scaling="non-uniform"> This is some flowing stuff. This is some flowing stuff. This is some flowing stuff. This is some flowing stuff. This is some flowing stuff. This is some flowing stuff. This is some flowing stuff. This is some flowing stuff. </fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
结果: