Problema de alineación del texto con el informe generado como archivo PDF cuando se usa markup = “html” usando iReport
Tengo los siguientes datos para imprimir en el PDF,
101 HARRIER WAY<br>OMVILLE<br>BELLSHIRE<br>OM1 1HA<br>
Necesita ser mostrado de la siguiente manera,
101 HARRIER WAY
OMVILLE
BELLSHIRE
OM1 1HA
Pero se está imprimiendo como la siguiente,
ACTUALIZAR:
Cuando uso otro texto en lugar deOMVILLE
decir
101 HARRIER WAY<br>HELLO WORLD BANGALORE<br>BELLSHIRE<br>OM1 1HA<br>
funciona bien. No tengo ni idea de por qué no funciona cuando doyOMVILLE
Código:
<?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="accountStatement" pageWidth="720" pageHeight="1008" columnWidth="680" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isTitleNewPage="true">
<parameter name="address" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<title>
<band height="914" splitType="Stretch">
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="117" y="141" width="297" height="105" isRemoveLineWhenBlank="true"/>
<textElement markup="html">
<font size="9" isBold="false" pdfFontName="Helvetica"/>
<paragraph lineSpacing="Single" tabStopWidth="60"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{address}]]></textFieldExpression>
</textField>
</band>
</title>
</jasperReport>
Estoy ejecutando este código usandoiReport 4.0.2 y miJasperReportes La versión es 4.
Para ejecutar el código anterior, use todos los parámetros de entrada como valores predeterminados y para el parámetro de dirección, indique uno debajo de uno.
101 HARRIER WAY<br>OMVILLE<br>BELLSHIRE<br>OM1 1HA<br>
PD: Estoy generando el jrxml en formato PDF.