File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1818
1919import java .util .HashMap ;
2020import java .util .Map ;
21+ import org .apache .logging .log4j .LogManager ;
22+ import org .apache .logging .log4j .Logger ;
2123import org .apache .pdfbox .cos .COSArray ;
2224import org .apache .pdfbox .cos .COSBase ;
2325import org .apache .pdfbox .cos .COSDictionary ;
3133 */
3234public class DictionaryEncoding extends Encoding
3335{
36+ private static final Logger LOG = LogManager .getLogger (DictionaryEncoding .class );
37+
3438 private final COSDictionary encoding ;
3539 private final Encoding baseEncoding ;
3640 private final Map <Integer , String > differences = new HashMap <>();
@@ -80,6 +84,10 @@ public DictionaryEncoding(COSDictionary fontEncoding)
8084 baseEncoding = Encoding .getInstance (name ); // null when the name is invalid
8185 if (baseEncoding != null )
8286 {
87+ // PDFBOX-5963
88+ // PDF Specification: "Differences array shall specify the complete character
89+ // encoding for this font" but other viewers read it, thus we do too.
90+ LOG .warn ("/BaseEncoding in type 3 font" );
8391 codeToName .putAll (baseEncoding .codeToName );
8492 inverted .putAll (baseEncoding .inverted );
8593 }
You can’t perform that action at this time.
0 commit comments