Package com.orsonpdf

Class PDFFont

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String baseFont
      The BaseFont (for example, "/Helvetica").
      static java.lang.String COURIER
      Identifier for the standard PDF font 'Courier'.
      static java.lang.String COURIER_BOLD
      Identifier for the standard PDF font 'Courier-Bold'.
      static java.lang.String COURIER_BOLDITALIC
      Identifier for the standard PDF font 'Courier-BoldItalic'.
      static java.lang.String COURIER_ITALIC
      Identifier for the standard PDF font 'Courier-Italic'.
      private java.lang.String encoding  
      static java.lang.String HELVETICA
      Identifier for the standard PDF font 'Helvetica'.
      static java.lang.String HELVETICA_BOLD
      Identifier for the standard PDF font 'Helvetica-Bold'.
      static java.lang.String HELVETICA_BOLDOBLIQUE
      Identifier for the standard PDF font 'Helvetica-BoldOblique'.
      static java.lang.String HELVETICA_OBLIQUE
      Identifier for the standard PDF font 'Helvetica-Oblique'.
      private java.lang.String name  
      static java.lang.String TIMES_BOLD
      Identifier for the standard PDF font 'Times-Bold'.
      static java.lang.String TIMES_BOLDITALIC
      Identifier for the standard PDF font 'Times-BoldItalic'.
      static java.lang.String TIMES_ITALIC
      Identifier for the standard PDF font 'Times-Italic'.
      static java.lang.String TIMES_ROMAN
      Identifier for the standard PDF font 'Times-Roman'.
    • Constructor Summary

      Constructors 
      Constructor Description
      PDFFont​(int number, int generation, java.lang.String name, java.lang.String baseFont, java.lang.String encoding)
      Creates a new PDFFont instance.
    • Field Detail

      • HELVETICA

        public static final java.lang.String HELVETICA
        Identifier for the standard PDF font 'Helvetica'.
        See Also:
        Constant Field Values
      • HELVETICA_BOLD

        public static final java.lang.String HELVETICA_BOLD
        Identifier for the standard PDF font 'Helvetica-Bold'.
        See Also:
        Constant Field Values
      • HELVETICA_OBLIQUE

        public static final java.lang.String HELVETICA_OBLIQUE
        Identifier for the standard PDF font 'Helvetica-Oblique'.
        See Also:
        Constant Field Values
      • HELVETICA_BOLDOBLIQUE

        public static final java.lang.String HELVETICA_BOLDOBLIQUE
        Identifier for the standard PDF font 'Helvetica-BoldOblique'.
        See Also:
        Constant Field Values
      • TIMES_ROMAN

        public static final java.lang.String TIMES_ROMAN
        Identifier for the standard PDF font 'Times-Roman'.
        See Also:
        Constant Field Values
      • TIMES_BOLD

        public static final java.lang.String TIMES_BOLD
        Identifier for the standard PDF font 'Times-Bold'.
        See Also:
        Constant Field Values
      • TIMES_ITALIC

        public static final java.lang.String TIMES_ITALIC
        Identifier for the standard PDF font 'Times-Italic'.
        See Also:
        Constant Field Values
      • TIMES_BOLDITALIC

        public static final java.lang.String TIMES_BOLDITALIC
        Identifier for the standard PDF font 'Times-BoldItalic'.
        See Also:
        Constant Field Values
      • COURIER

        public static final java.lang.String COURIER
        Identifier for the standard PDF font 'Courier'.
        See Also:
        Constant Field Values
      • COURIER_BOLD

        public static final java.lang.String COURIER_BOLD
        Identifier for the standard PDF font 'Courier-Bold'.
        See Also:
        Constant Field Values
      • COURIER_ITALIC

        public static final java.lang.String COURIER_ITALIC
        Identifier for the standard PDF font 'Courier-Italic'.
        See Also:
        Constant Field Values
      • COURIER_BOLDITALIC

        public static final java.lang.String COURIER_BOLDITALIC
        Identifier for the standard PDF font 'Courier-BoldItalic'.
        See Also:
        Constant Field Values
      • name

        private java.lang.String name
      • baseFont

        private java.lang.String baseFont
        The BaseFont (for example, "/Helvetica").
      • encoding

        private java.lang.String encoding
    • Constructor Detail

      • PDFFont

        PDFFont​(int number,
                int generation,
                java.lang.String name,
                java.lang.String baseFont,
                java.lang.String encoding)
        Creates a new PDFFont instance.
        Parameters:
        number - the PDF object number.
        generation - the PDF object generation number.
        name - the font name within the PDF document.
        baseFont - the base font name.
        encoding - the encoding.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the font within the PDF document (this is not the same as the font name).
        Returns:
        The font name.
      • getObjectBytes

        public byte[] getObjectBytes()
        Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.
        Specified by:
        getObjectBytes in class PDFObject
        Returns:
        A byte array.
      • createDictionary

        private Dictionary createDictionary()