1

I am fop-newbie who is willing to generate PDF using Apache FOP, as described below

[ 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. ]

I plan to create .fo file using the data I have, and then get PDF using Apache FOP. When I use

<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 ..... >

the image appears, but text starts from the top of the second column on the page, on top of the image. Please guide me, how to go about designing this layout. Any pointers to similar design will be useful. Thanks all

4

2 回答 2

1

这对我有用。

我将元素包装在 a 中fo:block并使用span="all"块上的属性。这使得块跨越整个页面,而不仅仅是它自己的列。

例子:

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

一些有用的资源:

于 2017-02-02T03:43:30.987 回答
0

也许这有帮助http://cnx.org/content/m43650/latest/

特别注意注意:页眉和页脚的空间取自该区域。因此,这必须在定义中通过添加至少页眉和页脚范围的边距来补偿。

是否可以粘贴您希望布局看起来如何的图形?

于 2013-03-19T15:21:05.250 回答