Class PDFFont

  • All Implemented Interfaces:
    Serializable, OptionDataListener, org.zkoss.json.JSONAware

    public class PDFFont
    extends Optionable
    Settings for a custom font for the exported PDF. This is used for languages containing non-ASCII characters, like Chinese, Russian, Japanese etc.

    As described in the jsPDF docs, the 14 standard fonts in PDF are limited to the ASCII-codepage. Therefore, in order to support other text in the exported PDF, one or more TTF font files have to be passed on to the exporting module.

    See more in the docs.

    Since:
    10.2.1.0
    Author:
    jumperchen
    See Also:
    Serialized Form
    • Constructor Detail

      • PDFFont

        public PDFFont()
    • Method Detail

      • getBold

        public String getBold()
        Returns the TTF font file for bold text.

        Default: null

      • setBold

        public void setBold​(String bold)
        Sets the TTF font file for bold text.
      • getBolditalic

        public String getBolditalic()
        Returns the TTF font file for bold and italic text.

        Default: null

      • setBolditalic

        public void setBolditalic​(String bolditalic)
        Sets the TTF font file for bold and italic text.
      • getItalic

        public String getItalic()
        Returns the TTF font file for italic text.

        Default: null

      • setItalic

        public void setItalic​(String italic)
        Sets the TTF font file for italic text.
      • getNormal

        public String getNormal()
        Returns the TTF font file for normal font-style. If font variations like bold or italic are not defined, the {@code normal" font will be used for those too.

        Default: {@code null}

      • setNormal

        public void setNormal​(String normal)
        Sets the TTF font file for normal font-style. If font variations like bold or italic are not defined, the {@code normal" font will be used for those too.