/** * Returns the CID for the given character code. If not found then CID 0 is returned. * * @param code character code * @return CID */ @Override public int codeToCID(int code) { return parent.getCMap().toCID(code); }
if (parent.getCMap().getName().startsWith("Identity-"))
@Override public int codeToCID(int code) { CMap cMap = parent.getCMap(); // Acrobat allows bad PDFs to use Unicode CMaps here instead of CID CMaps, see PDFBOX-1283 if (!cMap.hasCIDMappings() && cMap.hasUnicodeMappings()) { return cMap.toUnicode(code).codePointAt(0); // actually: code -> CID } return cMap.toCID(code); }
if (parent.getCMap().getName().startsWith("Identity-"))
/** * Returns the CID for the given character code. If not found then CID 0 is returned. * * @param code character code * @return CID */ @Override public int codeToCID(int code) { return parent.getCMap().toCID(code); }
if (parent.getCMap().getName().startsWith("Identity-"))
@Override public String getcmapName() { CMap cMap = ((org.apache.pdfbox.pdmodel.font.PDType0Font) this.pdFontLike).getCMap(); return cMap != null ? cMap.getName() : null; }
/** * Returns the CID for the given character code. If not found then CID 0 is returned. * * @param code character code * @return CID */ @Override public int codeToCID(int code) { return parent.getCMap().toCID(code); }
private List<PDCMap> getEncoding() { CMap charMap = ((org.apache.pdfbox.pdmodel.font.PDType0Font) this.pdFontLike) .getCMap(); if (charMap != null) { COSDictionary cosDictionary = ((org.apache.pdfbox.pdmodel.font.PDType0Font) this.pdFontLike).getCOSObject(); COSBase cmap = cosDictionary.getDictionaryObject(COSName.ENCODING); List<PDCMap> list = new ArrayList<>(MAX_NUMBER_OF_ELEMENTS); boolean isCMapCorrect = cmap != null && cmap instanceof COSStream; list.add(isCMapCorrect ? new PBoxPDCMap(charMap, (COSStream) cmap) : new PBoxPDCMap(charMap, null)); return Collections.unmodifiableList(list); } return Collections.emptyList(); }
@Override public int codeToCID(int code) { CMap cMap = parent.getCMap(); // Acrobat allows bad PDFs to use Unicode CMaps here instead of CID CMaps, see PDFBOX-1283 if (!cMap.hasCIDMappings() && cMap.hasUnicodeMappings()) { return cMap.toUnicode(code).codePointAt(0); // actually: code -> CID } return cMap.toCID(code); }
@Override public int codeToCID(int code) { CMap cMap = parent.getCMap(); // Acrobat allows bad PDFs to use Unicode CMaps here instead of CID CMaps, see PDFBOX-1283 if (!cMap.hasCIDMappings() && cMap.hasUnicodeMappings()) { return cMap.toUnicode(code).codePointAt(0); // actually: code -> CID } return cMap.toCID(code); }
@Override public Boolean getisSupplementCompatible() { org.apache.pdfbox.pdmodel.font.PDCIDFont descendantFont = ((org.apache.pdfbox.pdmodel.font.PDType0Font) this.pdFontLike).getDescendantFont(); if (descendantFont != null) { PDCIDSystemInfo cidSystemInfo = descendantFont.getCIDSystemInfo(); CMap currentCMap = ((org.apache.pdfbox.pdmodel.font.PDType0Font) this.pdFontLike).getCMap(); if (cidSystemInfo != null && currentCMap != null) { return Boolean.valueOf(cidSystemInfo.getSupplement() >= currentCMap.getSupplement()); } } return Boolean.FALSE; }
CMap cMap = ((org.apache.pdfbox.pdmodel.font.PDType0Font) this.pdFontLike).getCMap(); String parentCMapOrdering = null; String parentCMapRegistry = null;