我正在尝试从HTML代码生成报告,但是在生成PDF时遇到问题。在具有HTML的位置,生成的PDF格式不正确
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 -->
<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="Generic builds html" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="10" bottomMargin="5" uuid="7485a8e1-c33a-4517-8d58-ed238a5e67ab">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<detail>
<band height="810">
<genericElement>
<reportElement x="0" y="0" width="555" height="810" backcolor="#FFFFFF" uuid="8253f119-c8a5-44a9-a3fa-47e8297c32f0"/>
<genericElementType namespace="http://jasperreports.sourceforge.net/jasperreports/html" name="htmlelement"/>
<genericElementParameter name="htmlContent">
<valueExpression><![CDATA["<p><img alt='' src='https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcShjeATe_p1qOlUPnTiMX2esyQr0DoNFO_1SBrZ2eTuGn8jh4Lq' style='float:right; height:123px; width:123px' /></p><p> </p><p> </p><p style='text-align:center'> </p><p style='text-align:center'><span style='font-size:14px'><strong>MEDSOM DIAG. MÉDICOS LTDA<br />Rua Dom Joaquim, 615<br />Florianópolis - SC CEP: 88015-310<br />Fone: 30282804 - 30282805<br />CNPJ: 792278720001/47</strong></span></p><p style='text-align:center'> </p><p style='text-align:center'> </p><h1 style='text-align:center'><span style='font-size:18px'><strong>DECLARAÇÃO</strong></span></h1><p style='text-align:center'> </p><p style='text-align:center'><br /><span style='font-size:16px'>Declaramos para os devidos fins que o(a) Sr(a). Alisson da Silveira Mendes , compareceu a esta clínica no dia 06/03/19 , no horário de 15:00 até 15:30 para realização de exames. </span><br /><br /> </p><p style='text-align:center'> </p><p style='text-align:center'><span style='font-size:14px'>Florianópolis, <strong>06/03/19 </strong></span></p><p style='text-align:center'> </p><p style='text-align:center'> </p><p style='text-align:center'> </p><p style='text-align:center'><span style='font-size:14px'><strong>Medsom Diagnósticos Médicos Ltda</strong></span></p><p style='text-align:center'> </p>"]]></valueExpression>
</genericElementParameter>
<genericElementParameter name="scaleType">
<valueExpression><![CDATA["RealSize"]]></valueExpression>
</genericElementParameter>
<genericElementParameter name="horizontalAlign">
<valueExpression><![CDATA["Right"]]></valueExpression>
</genericElementParameter>
</genericElement>
</band>
</detail>
</jasperReport>