Class DictionaryEncoding
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.font.encoding.Encoding
-
- com.tom_roush.pdfbox.pdmodel.font.encoding.DictionaryEncoding
-
- All Implemented Interfaces:
COSObjectable
public class DictionaryEncoding extends Encoding
This will perform the encoding from a dictionary.
-
-
Field Summary
-
Fields inherited from class com.tom_roush.pdfbox.pdmodel.font.encoding.Encoding
CHAR_CODE, CHAR_NAME, codeToName, inverted
-
-
Constructor Summary
Constructors Constructor 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 Modifier and Type Method Description EncodinggetBaseEncoding()Returns the base encoding.COSBasegetCOSObject()Convert this standard java object to a COS object.Map<Integer,String>getDifferences()Returns the Differences array.StringgetEncodingName()Returns the name of this encoding.-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.font.encoding.Encoding
add, contains, contains, getCodeToNameMap, getInstance, getName, getNameToCodeMap, overwrite
-
-
-
-
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.
-
getCOSObject
public COSBase getCOSObject()
Description copied from interface:COSObjectableConvert 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:EncodingReturns the name of this encoding.- Specified by:
getEncodingNamein classEncoding
-
-