Class DictionaryEncoding

java.lang.Object
org.apache.pdfbox.pdmodel.font.encoding.Encoding
org.apache.pdfbox.pdmodel.font.encoding.DictionaryEncoding
All Implemented Interfaces:
COSObjectable

public class DictionaryEncoding extends Encoding
This will perform the encoding from a dictionary.
Author:
Ben Litchfield
  • Constructor Details

    • DictionaryEncoding

      public DictionaryEncoding(COSName baseEncoding, COSArray differences)
      Creates a new DictionaryEncoding for embedding.
      Parameters:
      baseEncoding -
      differences -
    • DictionaryEncoding

      public DictionaryEncoding(COSDictionary fontEncoding)
      Creates a new DictionaryEncoding for a Type 3 font from a PDF.
      Parameters:
      fontEncoding - The Type 3 encoding dictionary.
    • DictionaryEncoding

      public DictionaryEncoding(COSDictionary fontEncoding, boolean isNonSymbolic, Encoding builtIn)
      Creates a new DictionaryEncoding from a PDF.
      Parameters:
      fontEncoding - The encoding dictionary.
      isNonSymbolic - True if the font is non-symbolic. False for Type 3 fonts.
      builtIn - The font's built-in encoding. Null for Type 3 fonts.
  • Method Details

    • getBaseEncoding

      public Encoding getBaseEncoding()
      Returns the base encoding. Will be null for Type 3 fonts.
    • getDifferences

      public Map<Integer,String> getDifferences()
      Returns the Differences array.
    • getCOSObject

      public COSBase getCOSObject()
      Description copied from interface: COSObjectable
      Convert this standard java object to a COS object.
      Returns:
      The cos object that matches this Java object.
    • getEncodingName

      public String getEncodingName()
      Description copied from class: Encoding
      Returns the name of this encoding.
      Specified by:
      getEncodingName in class Encoding