pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1825478 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java
Date Tue, 27 Feb 2018 17:49:42 GMT
Author: tilman
Date: Tue Feb 27 17:49:41 2018
New Revision: 1825478

URL: http://svn.apache.org/viewvc?rev=1825478&view=rev
Log:
PDFBOX-4055: output message that the JBIG2 plugin is now available from Apache

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java?rev=1825478&r1=1825477&r2=1825478&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/filter/JBIG2Filter.java Tue
Feb 27 17:49:41 2018
@@ -47,11 +47,23 @@ final class JBIG2Filter extends Filter
 {
     private static final Log LOG = LogFactory.getLog(JBIG2Filter.class);
 
+    private static boolean newPluginChecked = false;
+
     @Override
     public DecodeResult decode(InputStream encoded, OutputStream decoded,
                                          COSDictionary parameters, int index) throws IOException
     {
         ImageReader reader = findImageReader("JBIG2", "jbig2-imageio is not installed");
+        if (!newPluginChecked)
+        {
+            if (reader.getClass().getName().contains("levigo"))
+            {
+                LOG.info("The Levigo JBIG2 plugin has been donated to the Apache Foundation");
+                LOG.info("and an improved version is available for download at "
+                        + "https://pdfbox.apache.org/download.cgi");
+            }
+            newPluginChecked = true;
+        }
         DecodeResult result = new DecodeResult(new COSDictionary());
         result.getParameters().addAll(parameters);
 



Mime
View raw message