pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1654354 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.java
Date Fri, 23 Jan 2015 19:59:04 GMT
Author: tilman
Date: Fri Jan 23 19:59:04 2015
New Revision: 1654354

URL: http://svn.apache.org/r1654354
Log:
PDFBOX-2576: merge if statements

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.java?rev=1654354&r1=1654353&r2=1654354&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.java
Fri Jan 23 19:59:04 2015
@@ -2036,17 +2036,16 @@ public final class PDPageContentStream i
      *
      * @throws IOException If the underlying stream has a problem being written to.
      */
+    @Override
     public void close() throws IOException
     {
         for (PDFont font : fontsToSubset)
         {
             // currently we only support subsetting Type0/CIDFontType2 fonts
-            if (font instanceof PDType0Font)
+            if (font instanceof PDType0Font
+                    && ((PDType0Font) font).getDescendantFont() instanceof PDCIDFontType2)
             {
-                if (((PDType0Font)font).getDescendantFont() instanceof PDCIDFontType2)
-                {
-                    font.subset(subsetCodePoints.get(font));
-                }
+                font.subset(subsetCodePoints.get(font));
             }
         }
         output.close();



Mime
View raw message