开发者

JasperReports PDF font name (default in jasperreports.properties)

开发者 https://www.devze.com 2023-04-02 06:41 出处:网络
I\'m trying to get JasperReports to embed a font present in the JasperReports fonts jar (from a DynamicJasper-generated report). I have this configured in the jasperreports.properties:

I'm trying to get JasperReports to embed a font present in the JasperReports fonts jar (from a DynamicJasper-generated report). I have this configured in the jasperreports.properties:

net.sf.jasperreports.default.pdf.font.name=DejaVu Sans
net.sf.jasperreports.default.pdf.encoding=Identity-H

This works perfectly fine if I put Helvetica and no enconding, and I'm positive that DejaVu Sans is in the classpath.

Will pdf.font.name accept then, any ttf in the classpath or jus开发者_如何转开发t the standard 14 PDF fonts?


"DejaVu Sans" is accepted because it is the sample Jasper font extension, which wraps an .ttf in a .jar file. You can set any font you want if you provide the corresponding font extension.

Font Extension sample doc: http://jasperreports.sourceforge.net/sample.reference/fonts/index.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号