/** * This methods adds new name in the Dests NameTree. It throws an exception, if the name already exists. * * @param key Name of the destination. * @param value An object destination refers to. Must be an array or a dictionary with key /D and array. * See ISO 32000-1 12.3.2.3 for more info. */ public void addNamedDestination(String key, PdfObject value) { checkClosingStatus(); if (value.isArray() && ((PdfArray)value).get(0).isNumber()) LoggerFactory.getLogger(PdfDocument.class).warn(LogMessageConstant.INVALID_DESTINATION_TYPE); catalog.addNamedDestination(key, value); }