Jasper reports Jasper Reports在pdf文件中不使用粗体文本
使用jasper reports(1.3)和itext库(1.3.1)制作pdf报告。字体定义如下:Jasper reports Jasper Reports在pdf文件中不使用粗体文本,jasper-reports,export-to-pdf,Jasper Reports,Export To Pdf,使用jasper reports(1.3)和itext库(1.3.1)制作pdf报告。字体定义如下: <reportFont name="font-normal" isDefault="true" fontName="Code2000" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="CODE2000.TTF" pdfEncoding="Iden
<reportFont name="font-normal" isDefault="true" fontName="Code2000" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="CODE2000.TTF" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
我们明确设置了isBold=“true”,但报告中没有粗体字。字体代码2000.TTF可在MS Word中使用粗体字体。我们还尝试在内部元素上设置isBold=“true”,但未成功,如中所示:
<textField>
<reportElement positionType="Float" x="0" y="120" width="694" height="14"/>
<textElement>
<font size="9" pdfFontName="CODE2000.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true" isBold="true"/>
</textElement>
<textFieldExpression class="java.lang.String">
"TITLE:"+str($P{title})
</textFieldExpression>
</textField>
“标题:“+str({TITLE}”)
非常感谢您的帮助。您的字体也有粗体TTF吗?如果是,它应该添加到字体定义中…我找不到Code200plz参考的粗体版本