Java 将ApacheFOP块拆分为多列以显示数据
我是fop新手,愿意使用ApacheFOP生成PDF,如下所述Java 将ApacheFOP块拆分为多列以显示数据,java,xsl-fo,apache-fop,Java,Xsl Fo,Apache Fop,我是fop新手,愿意使用ApacheFOP生成PDF,如下所述 [ 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 (lik
[ 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文件,然后使用ApacheFop获取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 ..... >
:
显示图像,但文本从页面上第二列的顶部开始,即图像的顶部。请指导我,如何着手设计这个布局。任何类似设计的指针都是有用的。谢谢大家也许这会有帮助
特别注意:页眉和页脚的空间取自该区域。因此,必须在定义中通过至少添加页眉和页脚范围的边距来补偿这一点
是否可以粘贴您希望布局外观的图形?这可能会有所帮助
特别注意:页眉和页脚的空间取自该区域。因此,必须在定义中通过至少添加页眉和页脚范围的边距来补偿这一点
是否可以粘贴您希望布局外观的图形?以下是对我有用的内容 我将元素包装在
fo:block
中,并在块上使用span=“all”
属性。这使得块跨越整个页面,而不仅仅是它自己的列
例如:
<fo:block span="all">
<fo:external-graphic src="image.png"/>
</fo:block>
一些有用的资源:
- 它可以拥有的所有元素和属性的信息:
- w3页关于span属性的内容:
- 以下是对我有效的方法
我将元素包装在
fo:block
中,并在块上使用span=“all”
属性。这使得块跨越整个页面,而不仅仅是它自己的列
例如:
<fo:block span="all">
<fo:external-graphic src="image.png"/>
</fo:block>
一些有用的资源:
- 它可以拥有的所有元素和属性的信息:
- w3页关于span属性的内容: