6

FOP を使用して pfd をレンダリングする必要があり、一部の画像を回転する必要があります。しかし、結果は私が期待するようには見えません。それで、ここに私の質問があります(そして、どういうわけか、この問題を明確にするための適切なドキュメントを見つけることができませんでした):

私が定義する場合

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

これはコンテナ全体を回転させますか (200x100 の寸法のレンダリングされたボックスに効果的につながります)、それとも単にコンテナのコンテンツを回転させますか (コンテナ自体は 100x200 の寸法でレンダリングされたままにします)?

4

1 に答える 1

5

コンテナ全体を回転させます。

これは、幅が高さよりも小さく、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 を使用)

ここに画像の説明を入力

于 2013-03-22T04:23:25.873 に答える