0

我正在使用 .jasper 文件来生成文档(pdf、doc、xls)。这是示例 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" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="d5daadb7-9081-40d7-b44e-80caa3d27ae5">
  <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
  <queryString>
    <![CDATA[]]>
  </queryString>
  <title>
    <band height="110" splitType="Stretch">
      <staticText>
        <reportElement x="105" y="64" width="344" height="30" uuid="f8bef38d-aff5-49c0-a499-4d003c3f4330"/>
        <textElement textAlignment="Center" verticalAlignment="Middle">
          <font size="16" isBold="true"/>
        </textElement>
        <text><![CDATA[HELLO WORLD]]></text>
      </staticText>
    </band>
  </title>
  <detail>
    <band height="125" splitType="Stretch"/>
  </detail>
</jasperReport>

生成文件时,pdf文件的字体为Arial,doc文件的字体为Times New Roman,excel文件的字体为SansSerif。

如何让所有文档类型都具有 Arial 字体?

我正在使用 ubuntu 16.04,jasperreports-6.0.3。

4

0 回答 0