/** * Get the annotations down appearance. * * <p> * This will get the annotations down appearance. If this is not existent an * empty appearance entry will be created. * * @return the appearance entry representing the down appearance. */ PDAppearanceEntry getDownAppearance() { PDAppearanceDictionary appearanceDictionary = getAppearance(); PDAppearanceEntry downAppearanceEntry = appearanceDictionary.getDownAppearance(); if (downAppearanceEntry.isSubDictionary()) { //TODO replace with "document.getDocument().createCOSStream()" downAppearanceEntry = new PDAppearanceEntry(new COSStream()); appearanceDictionary.setDownAppearance(downAppearanceEntry); } return downAppearanceEntry; }
/** * Get the annotations down appearance. * * <p> * This will get the annotations down appearance. If this is not existent an * empty appearance entry will be created. * * @return the appearance entry representing the down appearance. */ PDAppearanceEntry getDownAppearance() { PDAppearanceDictionary appearanceDictionary = getAppearance(); PDAppearanceEntry appearanceEntry = appearanceDictionary.getDownAppearance(); if (appearanceEntry.isSubDictionary()) { appearanceEntry = new PDAppearanceEntry(new COSStream()); appearanceDictionary.setDownAppearance(appearanceEntry); } return appearanceEntry; }
appearanceDictionary.setNormalAppearance(normal); appearanceDictionary.setRolloverAppearance(rollover); appearanceDictionary.setDownAppearance(down); annotation.setAppearance(appearanceDictionary);