2013-03-20 47 views
4

我必須使用FOP渲染一個pfd,並且可以旋轉一些圖像。但結果並不像我預期的那樣。所以,這裏是我的問題(我不知何故沒能找到一個很好的文件,以澄清這個問題對我來說):參考取向真的有用嗎?

如果我定義

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

將這個旋轉整個容器(有效領導到尺寸200x100的渲染框),還是僅僅旋轉容器的內容(保留容器本身的尺寸爲100x200)?

回答

3

它會旋轉整個容器。

這裏的所述寬度小於所述高度的一個例子,然後旋轉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