@Override public boolean hasGlyph(String name) throws IOException { COSBase base = getCharProcs().getDictionaryObject(COSName.getPDFName(name)); return base instanceof COSStream; }
/** * Returns the stream of the glyph for the given character code * * @param code character code * @return the stream to be used to render the glyph */ public PDType3CharProc getCharProc(int code) { String name = getEncoding().getName(code); COSBase base = getCharProcs().getDictionaryObject(COSName.getPDFName(name)); if (base instanceof COSStream) { return new PDType3CharProc(this, (COSStream) base); } return null; } }
COSDictionary cp = getCharProcs(); for (COSName name : cp.keySet())
@Override public boolean hasGlyph(String name) throws IOException { COSBase base = getCharProcs().getDictionaryObject(COSName.getPDFName(name)); return base instanceof COSStream; }
@Override public boolean hasGlyph(String name) throws IOException { COSStream stream = (COSStream) getCharProcs().getDictionaryObject(COSName.getPDFName(name)); return stream != null; }
private void parseCharStrings() { COSDictionary charProcDict = ((org.apache.pdfbox.pdmodel.font.PDType3Font) this.pdFontLike).getCharProcs(); if (charProcDict != null) { Set<COSName> keySet = charProcDict.keySet(); Map<String, PDContentStream> map = new HashMap<>(keySet.size()); for (COSName cosName : keySet) { PDType3CharProc charProc = ((org.apache.pdfbox.pdmodel.font.PDType3Font) this.pdFontLike) .getCharProc(cosName); PBoxPDContentStream pdContentStream = new PBoxPDContentStream(charProc, this.resources, this.document, this.flavour); map.put(cosName.getName(), pdContentStream); } this.charStrings = Collections.unmodifiableMap(map); } else { this.charStrings = Collections.emptyMap(); } } }
/** * Returns the stream of the glyph for the given character code * * @param code character code * @return the stream to be used to render the glyph */ public PDType3CharProc getCharProc(int code) { String name = getEncoding().getName(code); if (!".notdef".equals(name)) { COSStream stream; stream = (COSStream)getCharProcs().getDictionaryObject(COSName.getPDFName(name)); if (stream == null) { return null; } return new PDType3CharProc(this, stream); } return null; } }
/** * Returns the stream of the glyph for the given character code * * @param code character code * @return the stream to be used to render the glyph */ public PDType3CharProc getCharProc(int code) { String name = getEncoding().getName(code); COSBase base = getCharProcs().getDictionaryObject(COSName.getPDFName(name)); if (base instanceof COSStream) { return new PDType3CharProc(this, (COSStream) base); } return null; } }
COSDictionary cp = getCharProcs(); for (COSName name : cp.keySet())
COSDictionary cp = getCharProcs(); for (COSName name : cp.keySet())