/** * @return font type (Type entry). */ public String getType() { String type = this.dictionary.getStringKey(ASAtom.TYPE); return type == null ? "" : type; }
private static String getRequirementsString(COSDictionary reqDict) { return reqDict.getStringKey(ASAtom.S); }
@Override public String getName() { return this.dictionary.getStringKey(ASAtom.NAME); }
public GFCosFilter(final COSName filterName, final COSDictionary decodeParms) { super(filterName, COS_FILTER_TYPE); if (filterName.getName() == ASAtom.CRYPT) { if (decodeParms == null) { this.decodeParms = IDENTITY; } else { this.decodeParms = decodeParms.getStringKey(ASAtom.NAME); } } else if (decodeParms == null) { this.decodeParms = DEFAULT; } else { this.decodeParms = CUSTOM; } }
public PageLabelDictionary(COSDictionary dict, int rangeStartIndex) { this.type = dict.getNameKey(ASAtom.S); String prefixValue = dict.getStringKey(ASAtom.P); this.prefix = prefixValue == null ? "" : prefixValue; Long integerKey = dict.getIntegerKey(ASAtom.ST); this.firstRangePortion = integerKey == null ? 1 : integerKey.intValue(); this.rangeStartIndex = rangeStartIndex; }
/** * @return Registry value from CMap CIDSystemInfo dictionary. */ public String getRegistry() { if (this.getCIDSystemInfo() == null) { return null; } return this.getCIDSystemInfo().getStringKey(ASAtom.REGISTRY); }
/** * @return Ordering value from CMap CIDSystemInfo dictionary. */ public String getOrdering() { if (this.getCIDSystemInfo() == null) { return null; } return this.getCIDSystemInfo().getStringKey(ASAtom.ORDERING); }
/** * Default constructor * * @param dictionary * greenfield COSDictionary */ public GFCosFileSpecification(COSDictionary dictionary) { super(dictionary, COS_FILE_SPECIFICATION_TYPE); this.f = this.baseObject.getStringKey(ASAtom.F); this.uf = this.baseObject.getStringKey(ASAtom.UF); this.afrelationship = dictionary.getStringKey(ASAtom.AF_RELATIONSHIP); }
/** * Constructor from COSDictionary. * * @param dictionary is font dictionary. */ public PDFont(COSDictionary dictionary) { super(new COSObject(dictionary)); if (dictionary == null) { dictionary = (COSDictionary) COSDictionary.construct().get(); } this.dictionary = dictionary; COSObject fd = dictionary.getKey(ASAtom.FONT_DESC); if (fd != null && fd.getType() == COSObjType.COS_DICT) { fontDescriptor = new PDFontDescriptor(fd); } else { fontDescriptor = new PDFontDescriptor(COSDictionary.construct()); } this.fontName = this.dictionary.getStringKey(ASAtom.BASE_FONT); this.subtype = this.dictionary.getNameKey(ASAtom.SUBTYPE); }
public String[] getGroupNames() { COSObject ocgs = getObject().getKey(ASAtom.OCGS); if (!ocgs.empty() && ocgs.getType() == COSObjType.COS_ARRAY) { COSArray ocgsArray = (COSArray) ocgs.getDirectBase(); int size = ocgsArray.size(); String[] groups = new String[size]; for(int i = 0; i < size; ++i) { COSObject obj = ocgs.at(i); if (!obj.empty() && obj.getType() == COSObjType.COS_DICT) { COSDictionary ocgDict = (COSDictionary) obj.getDirectBase(); String ocgName = ocgDict.getStringKey(ASAtom.NAME); groups[i] = ocgName == null ? "" : ocgName; } } return groups; } else { return null; } }