如何在页面底部放置带有向上拉伸的文本?
我需要在最后一页上放置动态免责声明。目标是将其放在页面底部附近(如果有帮助的话,我可以将其放入页脚中),然后将其增长 /伸展向上< / em>。
我尝试了:
<summary>
<band height="250" splitType="Stretch">
<rectangle>
<reportElement mode="Transparent" x="1" y="1" width="736" height="248" forecolor="#000000" uuid="eab6a45c-8a83-414b-b6d2-89ca9320f533">
</reportElement>
<graphicElement>
<pen lineWidth="1.0" lineStyle="Dotted" lineColor="#FF8080"/>
</graphicElement>
</rectangle>
<textField textAdjust="StretchHeight">
<reportElement positionType="FixRelativeToBottom" key="" mode="Opaque" x="0" y="220" width="738" height="13" forecolor="#000066" backcolor="#F5F5F5" uuid="c169a12b-718a-431e-81c1-33731dc633ee">
</reportElement>
<textElement verticalAlignment="Bottom">
<paragraph leftIndent="10" rightIndent="10" spacingBefore="7" spacingAfter="7"/>
</textElement>
<textFieldExpression>"Footer\n\nSecond paragraph.\n\nThird paragraph."</textFieldExpression>
</textField>
</band>
</summary>
但是测试菲尔德仍然向下延伸;将有第二页,或者文本将被切断。我期望positionType =“ fixRelativetobottom”
保留底部坐标并收缩结果的y坐标。
有一个技巧我如何实现这一目标?
要求:
- 1-3段文本的不同语言(因此无法提前告诉文本字段的高度)。这样可以防止诸如9个字段之类的技巧,其中8个字段总是被看不见/忽略。
- 免责声明周围的灰色背景应适合文本(因此背景中没有矩形,然后在其上打印文本)。
- 如果您打印不同版本的免责声明,则将纸质表彼此放置时,背景的底部边缘应对齐
I need to put a dynamic disclaimer on the last page. The goal is to have it near the bottom of the page (I can put it in the footer if that helps) and grow / stretch upwards.
I tried:
<summary>
<band height="250" splitType="Stretch">
<rectangle>
<reportElement mode="Transparent" x="1" y="1" width="736" height="248" forecolor="#000000" uuid="eab6a45c-8a83-414b-b6d2-89ca9320f533">
</reportElement>
<graphicElement>
<pen lineWidth="1.0" lineStyle="Dotted" lineColor="#FF8080"/>
</graphicElement>
</rectangle>
<textField textAdjust="StretchHeight">
<reportElement positionType="FixRelativeToBottom" key="" mode="Opaque" x="0" y="220" width="738" height="13" forecolor="#000066" backcolor="#F5F5F5" uuid="c169a12b-718a-431e-81c1-33731dc633ee">
</reportElement>
<textElement verticalAlignment="Bottom">
<paragraph leftIndent="10" rightIndent="10" spacingBefore="7" spacingAfter="7"/>
</textElement>
<textFieldExpression>"Footer\n\nSecond paragraph.\n\nThird paragraph."</textFieldExpression>
</textField>
</band>
</summary>
but the testfield still stretches downwards; there will either be a second page or the text will be cut off. I was expecting positionType="FixRelativeToBottom"
to preserve the bottom coordinate and shrink the Y coordinate of the result.
Is there a trick how I can achieve this?
Requirements:
- 1-3 paragraphs of text in different languages (so no way to tell in advance how high the text field will be). This prevents tricks like 9 fields where 8 are always invisible/ignored.
- Gray background around the disclaimer which should fit the text (so no rectangle in the background and then print text over it).
- If you print different versions of the disclaimer, the bottom edge of the background should align when you put the paper sheets on top of each other
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论