【发布时间】:2014-07-29 13:56:01
【问题描述】:
我正在使用 Jaspersoft Studio 并尝试做应该是最简单的任务之一,即调整静态文本元素的大小。但是,无论我想到什么方法来尝试更改文本大小,它都保持默认大小。
这是我用于此类静态文本元素的 .jrxml 代码
<staticText>
<reportElement mode="Opaque" x="0" y="0" width="700" height="40" forecolor="#00B050" uuid="52a12b2e-4819-44b4-8d51-047fd668e28c">
<property name="local_mesure_unitx" value="pixel"/>
<property name="com.jaspersoft.studio.unit.x" value="px"/>
<property name="local_mesure_unity" value="pixel"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="local_mesure_unitwidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left">
<font size="18" isBold="true"/>
</textElement>
<text><![CDATA[Supportive Services]]></text>
</staticText>
附件也是我使用编辑器设置字体大小的图像。
进行这些更改后,文本仍然是默认大小。这是生成报告的图像...
有人知道为什么会这样吗? Jaspersoft Studio 或 JasperReports 中是否有某种我忘记的全局文本设置?
【问题讨论】:
-
我已确定此问题仅存在于 .pdf 中,很可能会通过使用 pdfFontName 和/或 pdfEncoding 标签来解决
标签: jasper-reports jaspersoft-studio