Class CMapToUnicode

java.lang.Object
com.itextpdf.io.font.cmap.AbstractCMap
com.itextpdf.io.font.cmap.CMapToUnicode

public class CMapToUnicode extends AbstractCMap
This class represents a CMap file.
  • Field Details

  • Constructor Details

    • CMapToUnicode

      public CMapToUnicode()
      Creates a new instance of CMap.
  • Method Details

    • getIdentity

      public static CMapToUnicode getIdentity()
    • createToUnicodeCmap

      public static CMapToUnicode createToUnicodeCmap (FontEncoding fontEncoding)
      Creates a ToUnicode CMap from the given font encoding.
      Parameters:
      fontEncoding - the font encoding
      Returns:
      the ToUnicode CMap
    • hasByteMappings

      public boolean hasByteMappings()
      This will tell if this cmap has any two byte mappings.
      Returns:
      true If there are any two byte mappings, false otherwise
    • lookup

      public char[] lookup (byte[] code, int offset, int length)
      This will perform a lookup into the map.
      Parameters:
      code - the code used to lookup
      offset - the offset into the byte array
      length - the length of the data we are getting
      Returns:
      the string that matches the lookup
    • lookup

      public char[] lookup (byte[] code)
    • lookup

      public char[] lookup (int code)
    • getCodes

      public Set<Integer> getCodes()
    • createDirectMapping

      public com.itextpdf.io.util.IntHashtable createDirectMapping()
    • createReverseMapping

      public Map<Integer,Integer> createReverseMapping()
    • getCodeSpaceRanges

      public List getCodeSpaceRanges()
      Returns a list containing sequential pairs of code space beginning and endings: (begincodespacerange1, endcodespacerange1, begincodespacerange2, endcodespacerange1, ...)
      Returns:
      list of byte[] that contain code space ranges