private COSDictionary getCatalog() { COSBase catalogLocal = cosDocument.getTrailer().getRoot().getDirectBase(); if (catalogLocal != null && catalogLocal.getType() == COSObjType.COS_DICT) { return (COSDictionary) catalogLocal; } return null; }
public void setArrayKey(final ASAtom key) { if (this.base == null || !this.base.setArrayKey(key)) { COSObject obj = COSArray.construct(); this.base = new COSDictionary(key, obj); } }
private static COSObject getInformationDictionary(COSDocument document) { final COSObject info = document.getTrailer().getInfo(); if (info != null && info.getType() == COSObjType.COS_DICT) { return info; } return null; }
private static COSDictionary getDescendantCOSDictionary(COSDictionary dict) { if (dict != null) { COSArray array = (COSArray) dict.getKey(ASAtom.DESCENDANT_FONTS).getDirectBase(); if (array != null) { return (COSDictionary) array.at(0).getDirectBase(); } } return null; }
protected void updateToObject() { COSObject filters = getObject(); filters.clearArray(); for (ASAtom entry : this.entries) { filters.add(COSName.construct(entry)); } }
public void setSize(final Long size) { if (getPrev() != null && getPrev() != 0) { final Long prevSize = getObject().getIntegerKey(ASAtom.SIZE); if (prevSize > size) { return; } } getObject().setIntegerKey(ASAtom.SIZE, size); }
protected COSIndirect() { super(); this.key = new COSKey(); this.document = new COSDocument(null); this.child = new COSObject(); }
public void setData(final ASInputStream stream, final COSStream.FilterFlags flags) { if (stream != null && (this.base == null || !this.base.setData(stream, flags))) { COSObject obj; if (this.base instanceof COSDictionary) { obj = COSStream.construct((COSDictionary) this.base, stream, flags); } else { obj = COSStream.construct(stream); } this.base = obj.base; } }
public void setEndstreamKeywordCRLFCompliant(final boolean endstreamKeywordCRLFCompliant) { if (this.base == null || !this.base.setEndstreamKeywordCRLFCompliant(endstreamKeywordCRLFCompliant)) { COSObject obj; if (this.base instanceof COSDictionary) { obj = COSStream.construct((COSDictionary) this.base); } else { obj = COSStream.construct(); } this.base = obj.base; this.base.setEndstreamKeywordCRLFCompliant(endstreamKeywordCRLFCompliant); } }
/** * @return COSObject that is font dictionary for descendant font. */ public COSObject getDescendantFontObject() { if (this.type0FontDict != null) { COSArray array = (COSArray) this.type0FontDict.getKey(ASAtom.DESCENDANT_FONTS).getDirectBase(); if (array != null) { return array.at(0); } } return null; }
public void setArrayKey(final ASAtom key, final COSObject array) { if (array != null && (this.base == null || !this.base.setArrayKey(key, array))) { COSObject obj = COSArray.construct(); this.base = new COSDictionary(key, obj); } }
public void setArrayKey(final ASAtom key, final int size, final double[] value) { if (value != null && (this.base == null || this.base.setArrayKey(key, size, value))) { COSObject obj = COSArray.construct(size, value); this.base = new COSDictionary(key, obj); } }
public void setArrayKey(final ASAtom key, final int size, final COSObject[] value) { if (value != null && (this.base == null || !this.base.setArrayKey(key, size, value))) { COSObject obj = COSArray.construct(size, value); this.base = new COSDictionary(key, obj); } }