gpt4 book ai didi

xsl-fo - 引用导向到底有什么作用?

转载 作者:行者123 更新时间:2023-12-03 14:30:46 25 4
gpt4 key购买 nike

我必须使用 FOP 渲染 pfd,并且必须旋转一些图像。然而,结果看起来并不像我期望的那样。所以,这是我的问题(我不知何故无法找到一个好的文档来为我澄清这个问题):

如果我定义

fo:block-container reference-orientation="90" width="100" height="200"

这会旋转整个容器(有效地导致尺寸为 200x100 的渲染框),还是只会旋转容器的内容(让容器本身以 100x200 尺寸渲染)?

最佳答案

它将旋转整个容器。

这是宽度小于高度然后旋转 90 度的示例...

XSL-FO

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="my-page" page-width="8.5in" page-height="11in">
<fo:region-body margin="1in" margin-top="1.5in" margin-bottom="1.5in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my-page">
<fo:flow flow-name="xsl-region-body">
<fo:block-container reference-orientation="90" width="3in" height="7in" background-color="black" padding="4pt">
<fo:block color="white">Ten years ago a crack commando unit was sent to prison by a military court for a crime they didn't commit. These men promptly escaped
from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune.
If you have a problem and no one else can help, and if you can find them, maybe you can hire the A-team.</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>

PDF输出 (使用 FOP 1.0)

enter image description here

关于xsl-fo - 引用导向到底有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15523020/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com