- itext , (CMapAwareDocumentFont.decodeSingleCID), :
private String decodeSingleCID(byte[] bytes, int offset, int len){
if (toUnicodeCmap != null){
if (offset + len > bytes.length)
throw new ArrayIndexOutOfBoundsException("Invalid index: " + offset + len);
return toUnicodeCmap.lookup(bytes, offset, len);
}
if (len == 1){
return new String(cidbyte2uni, 0xff & bytes[offset], 1);
}
throw new Error("Multi-byte glyphs not implemented yet");
}
An exception to ArrayIndexOutOfBoundsException is standard Java. I see no reason why your original try-catch does not work.
Perhaps you should post the whole class? Also, which version of itext are you using?
source
share