如何使字段显示为下标或在文本基线下显示字段。
当我使用USPSIMBStandard字体时,应打印的信息跳到上方或隐藏文本字段的上部分。当我将信息的任何部分复制到Word中并进行下标处理时,它会正确地显示。
如何使字段显示为下标或在文本基线下显示字段。
当我使用USPSIMBStandard字体时,应打印的信息跳到上方或隐藏文本字段的上部分。当我将信息的任何部分复制到Word中并进行下标处理时,它会正确地显示。
您可以使用样式标记来解决此任务,<sub>
标记用于下标文本,<sup>
标记用于上标文本。
jrxml文件:
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="test_markup" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="c3c991dc-b3f2-4d45-b429-821e33c5324d">
<title>
<band height="55" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement uuid="6b947a69-22bb-4a63-9e56-cacc75747df0" x="115" y="17" width="324" height="20"/>
<textElement markup="styled">
<font isUnderline="false" isStrikeThrough="false"/>
</textElement>
<textFieldExpression><![CDATA["Text with<sup>superscript</sup> \nText with<sub>subscript</sub>"]]></textFieldExpression>
</textField>
</band>
</title>
</jasperReport>