Skip to content

Commit

Permalink
PDFBOX-5384: use workaround only if /ToUnicode is a stream due to fai…
Browse files Browse the repository at this point in the history
…lure with sample_fonts_solidconvertor.pdf

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922173 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Nov 27, 2024
1 parent b9b817f commit 9a946bd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ private CMap loadUnicodeCmap()
{
String name = getName();
LOG.warn("Invalid ToUnicode CMap in font {}", name);
if (name != null && (name.startsWith("Tahoma") || name.startsWith("Verdana")))
if (toUnicode instanceof COSStream && name != null &&
(name.startsWith("Tahoma") || name.startsWith("Verdana")))
{
// PDFBOX-5384: workaround inspired by PDF.js 15719 and 11242
return null;
Expand Down

0 comments on commit 9a946bd

Please sign in to comment.