pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1844304 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType3Font.java
Date Fri, 19 Oct 2018 06:13:38 GMT
Author: tilman
Date: Fri Oct 19 06:13:37 2018
New Revision: 1844304

URL: http://svn.apache.org/viewvc?rev=1844304&view=rev
Log:
PDFBOX-4355: treat empty type3 content streams as non existent

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType3Font.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType3Font.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType3Font.java?rev=1844304&r1=1844303&r2=1844304&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType3Font.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDType3Font.java Fri
Oct 19 06:13:37 2018
@@ -160,7 +160,8 @@ public class PDType3Font extends PDSimpl
     public float getWidthFromFont(int code) throws IOException
     {
         PDType3CharProc charProc = getCharProc(code);
-        if (charProc == null)
+        if (charProc == null || charProc.getContentStream() == null || 
+            charProc.getContentStream().getLength() == 0)
         {
             return 0;
         }



Mime
View raw message