Package com.itextpdf.io.font
Class CMapEncoding
java.lang.Object
com.itextpdf.io.font.CMapEncoding
Class representing CMap encoding in pdf document.
-
Constructor Summary
ConstructorsConstructorDescriptionCMapEncoding
(String cmap) Creates a new CMap encoding.CMapEncoding
(String cmap, byte[] cmapBytes) Creates a new CMap encoding.CMapEncoding
(String cmap, String uniMap) Creates a new CMap encoding. -
Method Summary
Modifier and TypeMethodDescriptionint
fillCmapBytes
(int cid, byte[] array, int offset) void
fillCmapBytes
(int cid, ByteBuffer buffer) int
getCidCode
(int cmapCode) byte[]
getCmapBytes
(int cid) Gets CMap bytes by CID.int
getCmapBytesLength
(int cid) Gets CMap name.Gets string that uniquely names the character collection within the specified registry.Gets string identifying the issuer of the character collection.int
Gets the supplement number of the character collectionGets CMap name which converts Unicode value to CID.boolean
Checks if CMap to convert Unicode value to CID is present.boolean
isBuiltWith
(String cmap) Checks whether theCMapEncoding
was built with corresponding cmap name.boolean
isDirect()
Checks if CMap is direct or indirect pdf object
-
Constructor Details
-
CMapEncoding
Creates a new CMap encoding.- Parameters:
-
cmap
- CMap name
-
CMapEncoding
Creates a new CMap encoding.- Parameters:
-
cmap
- CMap name -
uniMap
- CMap to convert Unicode value to CID
-
CMapEncoding
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
Gets string identifying the issuer of the character collection.- Returns:
- name of the issuer
-
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
Gets CMap name which converts Unicode value to CID.- Returns:
- CMap name
-
getCmapName
Gets CMap name.- Returns:
- CMap name
-
isBuiltWith
Checks whether theCMapEncoding
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
-
getCmapBytesLength
public int getCmapBytesLength(int cid) -
getCidCode
public int getCidCode(int cmapCode) -
getCodeSpaceRanges
-