diff --git a/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java b/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java index 226a5e6e0fe..98364412078 100644 --- a/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java +++ b/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java @@ -144,7 +144,13 @@ private CMap loadUnicodeCmap() cmap = readCMap(toUnicode); if (cmap != null && !cmap.hasUnicodeMappings()) { - LOG.warn("Invalid ToUnicode CMap in font {}", getName()); + String name = getName(); + LOG.warn("Invalid ToUnicode CMap in font {}", name); + if (name != null && (name.startsWith("Tahoma") || name.startsWith("Verdana"))) + { + // PDFBOX-5384: workaround inspired by PDF.js 15719 and 11242 + return null; + } String cmapName = cmap.getName() != null ? cmap.getName() : ""; String ordering = cmap.getOrdering() != null ? cmap.getOrdering() : ""; COSName encoding = dict.getCOSName(COSName.ENCODING);