Skip to content

Commit 9a946bd

Browse files
committed
PDFBOX-5384: use workaround only if /ToUnicode is a stream due to failure with sample_fonts_solidconvertor.pdf
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922173 13f79535-47bb-0310-9956-ffa450edef68
1 parent b9b817f commit 9a946bd

File tree

1 file changed

+2
-1
lines changed
  • pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font

1 file changed

+2
-1
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFont.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ private CMap loadUnicodeCmap()
146146
{
147147
String name = getName();
148148
LOG.warn("Invalid ToUnicode CMap in font {}", name);
149-
if (name != null && (name.startsWith("Tahoma") || name.startsWith("Verdana")))
149+
if (toUnicode instanceof COSStream && name != null &&
150+
(name.startsWith("Tahoma") || name.startsWith("Verdana")))
150151
{
151152
// PDFBOX-5384: workaround inspired by PDF.js 15719 and 11242
152153
return null;

0 commit comments

Comments
 (0)