private String getOnValueForWidget(PDAnnotationWidget widget) { PDAppearanceDictionary apDictionary = widget.getAppearance(); if (apDictionary != null) { PDAppearanceEntry normalAppearance = apDictionary.getNormalAppearance(); if (normalAppearance != null) { Set<COSName> entries = normalAppearance.getSubDictionary().keySet(); for (COSName entry : entries) { if (COSName.Off.compareTo(entry) != 0) { return entry.getName(); } } } } return ""; }
widget.getCOSObject().getDictionaryObject(COSName.AP) != null) PDAppearanceDictionary appearanceDict = widget.getAppearance(); if (appearanceDict == null)
widget.getCOSObject().getDictionaryObject(COSName.AP) != null) PDAppearanceDictionary appearanceDict = widget.getAppearance(); if (appearanceDict == null)
PDAppearanceDictionary apDictionary = widget.getAppearance();
widget.getCOSObject().getDictionaryObject(COSName.AP) != null) PDAppearanceDictionary appearanceDict = widget.getAppearance(); if (appearanceDict == null)
private void updateByValue(String value) { getCOSObject().setName(COSName.V, value); // update the appearance state (AS) for (PDAnnotationWidget widget : getWidgets()) { if (widget.getAppearance() == null) { continue; } PDAppearanceEntry appearanceEntry = widget.getAppearance().getNormalAppearance(); if (((COSDictionary) appearanceEntry.getCOSObject()).containsKey(value)) { widget.setAppearanceState(value); } else { widget.setAppearanceState(COSName.Off.getName()); } } }
private String getOnValueForWidget(PDAnnotationWidget widget) { PDAppearanceDictionary apDictionary = widget.getAppearance(); if (apDictionary != null) { PDAppearanceEntry normalAppearance = apDictionary.getNormalAppearance(); if (normalAppearance != null) { Set<COSName> entries = normalAppearance.getSubDictionary().keySet(); for (COSName entry : entries) { if (COSName.Off.compareTo(entry) != 0) { return entry.getName(); } } } } return ""; }
private String getOnValueForWidget(PDAnnotationWidget widget) { PDAppearanceDictionary apDictionary = widget.getAppearance(); if (apDictionary != null) { PDAppearanceEntry normalAppearance = apDictionary.getNormalAppearance(); if (normalAppearance != null) { Set<COSName> entries = normalAppearance.getSubDictionary().keySet(); for (COSName entry : entries) { if (COSName.Off.compareTo(entry) != 0) { return entry.getName(); } } } } return ""; }
PDAppearanceDictionary apDictionary = widget.getAppearance();
PDAppearanceDictionary apDictionary = widget.getAppearance();
private void updateByValue(String value) throws IOException { getCOSObject().setName(COSName.V, value); // update the appearance state (AS) for (PDAnnotationWidget widget : getWidgets()) { if (widget.getAppearance() == null) { continue; } PDAppearanceEntry appearanceEntry = widget.getAppearance().getNormalAppearance(); if (((COSDictionary) appearanceEntry.getCOSObject()).containsKey(value)) { widget.setAppearanceState(value); } else { widget.setAppearanceState(COSName.Off.getName()); } } }
page.getAnnotations().add(pdAnnotationWidget); PDAppearanceDictionary pdAppearanceDictionary = pdAnnotationWidget.getAppearance(); if (pdAppearanceDictionary == null)
private void updateByValue(String value) { getCOSObject().setName(COSName.V, value); // update the appearance state (AS) for (PDAnnotationWidget widget : getWidgets()) { PDAppearanceEntry appearanceEntry = widget.getAppearance().getNormalAppearance(); if (((COSDictionary) appearanceEntry.getCOSObject()).containsKey(value)) { widget.getCOSObject().setName(COSName.AS, value); } else { widget.getCOSObject().setItem(COSName.AS, COSName.Off); } } }