2013-03-17 47 views
1

我FOP-新手誰願意來生成使用Apache FOP PDF,下面分裂的Apache FOP塊爲多列顯示數據

[ Imagine A4 page has dimensions 800pt x 600pt. The top 200pt x 600 pt will 
hold a image and some meta data about the entity. The space below this region 
needs to contain the description, but in two-column format (like newspapers). 
Sometimes description is so-big, that it spans mutiple pages. ] 

描述我打算用我的數據來創建.fo文件,然後使用Apache FOP獲取PDF。當我使用

<fo:region-body 
    margin-top="1cm" margin-bottom="0.25cm" 
    column-count="2" column-gap="0.25in"/> 
: 
<fo:external-graphic src="url('image.jpg')"/> 
<fo:block ..... > 

出現圖像,但文本從頁面上第二列的頂部開始,位於圖像頂部。請引導我,如何去設計這個佈局。任何指向類似設計的指針都會很有用。感謝所有

回答

0

也許這是有幫助的http://cnx.org/content/m43650/latest/

特別的說明注:頁眉和頁腳的空間與領域採取。因此,必須通過添加頁眉和頁腳範圍的邊界來定義補償。

是否可以粘貼一張你想如何佈局的圖形?

1

這是我的工作。

我將元素包裝在fo:block中,並在塊上使用了span="all"屬性。這使得該塊跨越整個頁面而不僅僅是它自己的列。

例子:

<fo:block span="all"> 
    <fo:external-graphic src="image.png"/> 
</fo:block> 

一些有用的資源:

:關於span屬性 http://www.datypic.com/sc/fo11/e-fo_block.html
  • W3頁