/** * This methods adds new name to 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. */ void addNamedDestination(String key, PdfObject value) { addNameToNameTree(key, value, PdfName.Dests); }
/** * Adds file attachment at document level. * * @param description the file description * @param fs {@link PdfFileSpec} object. */ public void addFileAttachment(String description, PdfFileSpec fs) { checkClosingStatus(); catalog.addNameToNameTree(description, fs.getPdfObject(), PdfName.EmbeddedFiles); }
getDocument().getCatalog().addNameToNameTree(description, fs.getPdfObject(), PdfName.EmbeddedFiles);