我正在用jasper 6.6.0生成PDF和docx格式的报告。 我面临的问题是第一行之后不能有段落缩进。输入文本是一个段落,该段落与XML文件之间用换行符隔开:
<Literatur>Bjelland, EK; Wilkosz, P; Tanbo, TG; Eskild, A (2014). Is unilateral oophorectomy associated with age at menopause? A population study (the HUNT2 Survey). Human Reproduction 29(4): 835-41. DOI: 10.1093/humrep/deu026
Leitlinienprogramm Onkologie (AWMF, Deutsche Krebsgesellschaft, Deutsche Krebshilfe) (2012): S3-Leitlinie Diagnostik, Therapie und Nachsorge des Mammakarzinoms, Langversion 3.0, 2012, AWMF-Registernummer: 032/045OL, http://leitlinienprogramm-onkologie.de/Mammakarzinom.67.0.html (Recherchedatum: 15.10.2015). Stand: Juli 2012, gültig bis 30.06.2017.
</Literatur>
我在
<style name="indent" style="Standard">
<box leftPadding="5"/>
<paragraph firstLineIndent="-5"/>
</style>
在文本字段中使用:
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement style="indent" positionType="Float" x="0" y="159" width="465" height="28" uuid="f7184f30-82ee-44b4-8dcb-9d3d70ac3bc8"/>
<textFieldExpression><![CDATA[$F{Literatur}]]></textFieldExpression>
</textField>
正如在Indentation in generated PDF using JasperReports中所张贴的那样,但这使文学部分消失了,根本没有显示出来。
如何像Java导出一样以PDF和docx格式导出?