Jasper模板使用记录八——背景实现整页边框

发布时间 2023-10-08 10:31:56作者: 无名可起0_0

背景Background实现整页边框

1. 使背景元素的大小与页面纸张大小一致,然后在背景元素上的添加的元素都会显示在页面的相应位置上
2. 这样就只需要在背景元素上添加一个矩形框,就可以作为整页的边框了

<background>
	<band height="800" splitType="Stretch">
		<property name="com.jaspersoft.studio.unit.height" value="px"/>
		<rectangle>
			<reportElement key="rectangle-2" x="0" y="0" width="560" height="800" uuid="fdec4aae-892f-471f-8db2-d7f2821a2145"/>
			<graphicElement>
				<pen lineWidth="0.5" lineStyle="Solid"/>
			</graphicElement>
		</rectangle>
	</band>
</background>