if (toUni != null){
try {
byte[] touni = PdfReader.getStreamBytes((PRStream)PdfReader.getPdfObjectRelease(toUni));
CMapParser cmapParser = new CMapParser();
toUnicodeCmap = cmapParser.parse(new ByteArrayInputStream(touni));
} catch (IOException e) {
throw new Error("Unable to process ToUnicode map - " + e.getMessage(), e);
}
}
}