Jasper reports JasperReport居中和右对齐不导出为PDF

Jasper reports JasperReport居中和右对齐不导出为PDF,jasper-reports,pdf-generation,Jasper Reports,Pdf Generation,我正在使用JasperSoft Studio,并使用JasperReport 5.5编译该项目 在studio中心和右对齐的文本字段中,构建和预览精细。 但是,当我在应用程序中使用JasperReport exportReportToPDF()方法时,所有文本都是左对齐的 JRXML使用textAlignment属性 <textElement textAlignment="Right"> <paragraph rightIndent="2"/&g

我正在使用JasperSoft Studio,并使用JasperReport 5.5编译该项目

在studio中心和右对齐的文本字段中,构建和预览精细。 但是,当我在应用程序中使用JasperReport exportReportToPDF()方法时,所有文本都是左对齐的

JRXML使用textAlignment属性

<textElement textAlignment="Right">
                <paragraph rightIndent="2"/>
</textElement>
<textFieldExpression><![CDATA[$F{weekday}]]></textFieldExpression>

有人知道这个问题吗?也许该属性不适合PDF

编辑

JasperReports 5.5版支持报告样式吗。 当我尝试使用报告样式(在工作区中使用JasperReport 5.5版)时,JasperSoft Studio崩溃


对齐问题似乎与继承相关。当单独使用子报表时,它会使文本正确对齐(右对齐或居中对齐),但在主报表中呈现时,对齐会丢失。

您有一些样式(内部或外部)吗?你在用字体吗?最好发布小样本(jrxml文件)来重现您的问题和错误结果的屏幕截图。您找到解决方案了吗?我现在对jaspersoft studio的6.3.1版本也有同样的问题。