jasperreport生成pdf_jasperreport 导出excel_jasperreport json(42)

电脑杂谈  发布时间:2017-02-04 10:28:36  来源:网络整理

In the fontName attribute of the <font> element or the <reportFont> element, you have to specify

the name of a physical font or the name of a logical font. You only have to make sure the font you

specify really exists and is available on your system.

For more details about fonts in Java, check the Java Tutorial or the JDK documentation.

Font Size

The font size is measured in points and can be specified using the size attribute.

Font Styles and Decorations

There are 4 boolean attributes available in the <font> and <reportFont> elements that control the

font style and/or decoration. Those are isBold, isItalic, isUnderline and isStrikeThrough

and their significance should be evident to anybody.

PDF Font Name

When exporting reports to PDF format, the JasperReports library uses the iText library.

As their name states it (Portable Document Format) the PDF files can be viewed on various platforms

and you can be sure they will always look the same. This is partially because in this format there is a

special way of dealing with fonts.

The JasperReports Ultimate Guide

Page 52

If you want to design your reports so that they eventually be exported to PDF, you have to make sure

you choose the appropriate PDF font settings that correspond to the Java font settings of your text

elements.

The iText library knows how to deal with built-in fonts and TTF files. It recognizes the following builtin

font names:

Courier

Courier-Bold

Courier-BoldOblique

Courier-Oblique


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-30468-42.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 杨佩雅
      杨佩雅

      军事上虽说他有绝对优势但中国滑的像个泥鳅不给他动粗的正当理由

    • 张婕
      张婕

      可是合娶老婆你太恶心我了

    • 徐璐璐
      徐璐璐

      警告后还不是滚出去了

    热点图片
    拼命载入中...