pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1601553 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDCcitt.java
Date Tue, 10 Jun 2014 06:09:19 GMT
Author: tilman
Date: Tue Jun 10 06:09:19 2014
New Revision: 1601553

URL: http://svn.apache.org/r1601553
Log:
PDFBOX-934: error message for unsupported G3 compression options

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDCcitt.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDCcitt.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDCcitt.java?rev=1601553&r1=1601552&r2=1601553&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDCcitt.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/xobject/PDCcitt.java
Tue Jun 10 06:09:19 2014
@@ -395,9 +395,18 @@ public class PDCcitt extends PDXObjectIm
                 }
                 case 292:
                 {
-                    if (val == 1)
+                    if ((val & 1) != 0)
                     {
-                        k = 50; // T4 2D - arbitary K value
+                        k = 50; // T4 2D - arbitary positive K value
+                    }
+                    // http://www.awaresystems.be/imaging/tiff/tifftags/t4options.html
+                    if ((val & 4) != 0)
+                    {
+                        throw new IOException("CCITT Group 3 'uncompressed mode' is not supported");
+                    }
+                    if ((val & 2) != 0)
+                    {
+                        throw new IOException("CCITT Group 3 'fill bits before EOL' is not
supported");
                     }
                     break;
                 }



Mime
View raw message