如何在 ireport pdf 输出中打印卢比符号?
How to print rupee symbol in ireport pdf output?
我想在我的 ireport pdf 输出中添加卢比符号。我已将字体 Indian_rupee.ttf
添加到构建路径并安装它,但我再次遇到同样的问题。
我能做什么?
您好,您可以将 Unicode 字符用于 'INDIAN RUPEE SIGN'
为此 unicode 使用字体 DejaVu Sans,
INR 的 Unicode 字符是 ₹(十六进制)。
如果上面的 unicode 不起作用,那么尝试 ₹(十进制)。
此 usicode 用于 HTML,因此请确保您是 select html 作为标记。
<textField>
<reportElement x="520" y="0" width="30" height="20" uuid=""/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="DejaVu Sans" size="14"/>
</textElement>
<textFieldExpression>"₹"</textFieldExpression>
</textField>
<textField>
<reportElement x="520" y="0" width="30" height="20" uuid=""/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="DejaVu Sans" size="14"/>
</textElement>
<textFieldExpression>"₹"</textFieldExpression>
</textField>
使用这个你只能在JRViewer中获取符号。
我面临同样的问题,能够在 JRViewer 中获取符号。但它不适用于 JRPdfExporter。 (在 pdf 上未显示)。
我想在我的 ireport pdf 输出中添加卢比符号。我已将字体 Indian_rupee.ttf
添加到构建路径并安装它,但我再次遇到同样的问题。
我能做什么?
您好,您可以将 Unicode 字符用于 'INDIAN RUPEE SIGN'
为此 unicode 使用字体 DejaVu Sans, INR 的 Unicode 字符是 ₹(十六进制)。
如果上面的 unicode 不起作用,那么尝试 ₹(十进制)。
此 usicode 用于 HTML,因此请确保您是 select html 作为标记。
<textField>
<reportElement x="520" y="0" width="30" height="20" uuid=""/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="DejaVu Sans" size="14"/>
</textElement>
<textFieldExpression>"₹"</textFieldExpression>
</textField>
<textField>
<reportElement x="520" y="0" width="30" height="20" uuid=""/>
<textElement textAlignment="Center" verticalAlignment="Middle" markup="html">
<font fontName="DejaVu Sans" size="14"/>
</textElement>
<textFieldExpression>"₹"</textFieldExpression>
</textField>
使用这个你只能在JRViewer中获取符号。 我面临同样的问题,能够在 JRViewer 中获取符号。但它不适用于 JRPdfExporter。 (在 pdf 上未显示)。