org.apache.pdfbox.pdmodel.font.encoding

## 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

### Field Summary

### Fields inherited from class org.apache.pdfbox.pdmodel.font.encoding.Encoding

`CHAR_CODE, CHAR_NAME, codeToName, inverted`

### Constructor Summary

Constructors
Constructor and Description
`DictionaryEncoding(COSDictionary fontEncoding)` Creates a new DictionaryEncoding for a Type 3 font from a PDF.
`DictionaryEncoding(COSDictionary fontEncoding, boolean isNonSymbolic, Encoding builtIn)` Creates a new DictionaryEncoding from a PDF.
`DictionaryEncoding(COSName baseEncoding, COSArray differences)` Creates a new DictionaryEncoding for embedding.

### Method Summary

All Methods Instance Methods Concrete Methods
`Encoding` `getBaseEncoding()` Returns the base encoding.
`COSBase` `getCOSObject()` Convert this standard java object to a COS object.
`Map<Integer,String>` `getDifferences()` Returns the Differences array.
`String` `getEncodingName()` Returns the name of this encoding.

### Methods inherited from class org.apache.pdfbox.pdmodel.font.encoding.Encoding

`add, contains, contains, getCodeToNameMap, getInstance, getName, getNameToCodeMap, overwrite`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### 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 Detail

#### 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`