Class CMapEncoding

java.lang.Object
com.itextpdf.io.font.CMapEncoding

public class CMapEncoding extends Object
Class representing CMap encoding in pdf document.
  • Constructor Details

    • CMapEncoding

      public CMapEncoding (String cmap)
      Creates a new CMap encoding.
      Parameters:
      cmap - CMap name
    • CMapEncoding

      public CMapEncoding (String cmap, String uniMap)
      Creates a new CMap encoding.
      Parameters:
      cmap - CMap name
      uniMap - CMap to convert Unicode value to CID
    • CMapEncoding

      public CMapEncoding (String cmap, byte[] cmapBytes)
      Creates a new CMap encoding.
      Parameters:
      cmap - CMap name
      cmapBytes - CMap binary data
  • Method Details

    • isDirect

      public boolean isDirect()
      Checks if CMap is direct or indirect pdf object
      Returns:
      true if direct, false otherwise
    • hasUniMap

      public boolean hasUniMap()
      Checks if CMap to convert Unicode value to CID is present.
      Returns:
      true if present, false otherwise
    • getRegistry

      public String getRegistry()
      Gets string identifying the issuer of the character collection.
      Returns:
      name of the issuer
    • getOrdering

      public String getOrdering()
      Gets string that uniquely names the character collection within the specified registry.
      Returns:
      character collection name
    • getSupplement

      public int getSupplement()
      Gets the supplement number of the character collection
      Returns:
      supplement number
    • getUniMapName

      public String getUniMapName()
      Gets CMap name which converts Unicode value to CID.
      Returns:
      CMap name
    • getCmapName

      public String getCmapName()
      Gets CMap name.
      Returns:
      CMap name
    • isBuiltWith

      public boolean isBuiltWith (String cmap)
      Checks whether the CMapEncoding was built with corresponding cmap name.
      Parameters:
      cmap - a CMAP
      Returns:
      true, if the CMapEncoding was built with the cmap, false otherwise.
    • getCmapBytes

      public byte[] getCmapBytes (int cid)
      Gets CMap bytes by CID.
      Parameters:
      cid - id of the CMap
      Returns:
      cmap as byte array
    • fillCmapBytes

      public int fillCmapBytes (int cid, byte[] array, int offset)
    • fillCmapBytes

      public void fillCmapBytes (int cid, ByteBuffer buffer)
    • getCmapBytesLength

      public int getCmapBytesLength (int cid)
    • getCidCode

      public int getCidCode (int cmapCode)
    • getCodeSpaceRanges

      public List getCodeSpaceRanges()