]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Replace embedded pdfbox jars with external plug-ins. 27/27/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 16 Aug 2016 22:25:02 +0000 (01:25 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 16 Aug 2016 22:25:02 +0000 (01:25 +0300)
Also updated pdfbox version from 1.8.10 to 2.0.2.

Change-Id: I400d049f5d90f839b9075e4370bd565b642d756a

bundles/org.simantics.help.base/.classpath
bundles/org.simantics.help.base/META-INF/MANIFEST.MF
bundles/org.simantics.help.base/build.properties
bundles/org.simantics.help.base/fontbox-1.8.10.jar [deleted file]
bundles/org.simantics.help.base/jempbox-1.8.10.jar [deleted file]
bundles/org.simantics.help.base/pdfbox-1.8.10-src.zip [deleted file]
bundles/org.simantics.help.base/pdfbox-1.8.10.jar [deleted file]
bundles/org.simantics.help.base/src/org/simantics/help/base/internal/PDFUtil.java
bundles/org.simantics.help.base/xmpbox-1.8.10.jar [deleted file]

index 6cf33fb32e72e613f1756dfb4028b3fa8a989d53..b1dabee38291b97f08cc3a18bee4e65b1e550530 100644 (file)
@@ -1,9 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <classpath>\r
-       <classpathentry exported="true" kind="lib" path="fontbox-1.8.10.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="jempbox-1.8.10.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="xmpbox-1.8.10.jar"/>\r
-       <classpathentry exported="true" kind="lib" path="pdfbox-1.8.10.jar" sourcepath="pdfbox-1.8.10-src.zip"/>\r
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>\r
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
        <classpathentry kind="src" path="src"/>\r
index 51c9d1aa0f3ff98c7908d1d6035ab19a3ed842f2..a20f8e475c2eb875f8c9e223b126e38380ef3122 100644 (file)
@@ -7,11 +7,9 @@ Bundle-Activator: org.simantics.help.base.internal.Activator
 Bundle-Vendor: Semantum Oy
 Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.help.base,
- org.apache.commons.logging;bundle-version="1.0.4"
+ org.apache.commons.logging;bundle-version="1.0.4",
+ org.apache.pdfbox;bundle-version="2.0.2",
+ org.apache.pdfbox.fontbox;bundle-version="2.0.2"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
 Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .,
- xmpbox-1.8.10.jar,
- jempbox-1.8.10.jar,
- fontbox-1.8.10.jar,
- pdfbox-1.8.10.jar
+Bundle-ClassPath: .
index 7904aba265b7750d7c55bb8ed2f9715953d706e5..c125ab4d7c2315faaddc837eda2730b8bc50d894 100644 (file)
@@ -2,9 +2,5 @@ source.. = src/
 output.. = bin/\r
 bin.includes = META-INF/,\\r
                .,\\r
-               plugin.xml,\\r
-               pdfbox-1.8.10.jar,\\r
-               fontbox-1.8.10.jar,\\r
-               jempbox-1.8.10.jar,\\r
-               xmpbox-1.8.10.jar\r
+               plugin.xml\r
 source.. = src/\r
diff --git a/bundles/org.simantics.help.base/fontbox-1.8.10.jar b/bundles/org.simantics.help.base/fontbox-1.8.10.jar
deleted file mode 100644 (file)
index 3284950..0000000
Binary files a/bundles/org.simantics.help.base/fontbox-1.8.10.jar and /dev/null differ
diff --git a/bundles/org.simantics.help.base/jempbox-1.8.10.jar b/bundles/org.simantics.help.base/jempbox-1.8.10.jar
deleted file mode 100644 (file)
index 48cc633..0000000
Binary files a/bundles/org.simantics.help.base/jempbox-1.8.10.jar and /dev/null differ
diff --git a/bundles/org.simantics.help.base/pdfbox-1.8.10-src.zip b/bundles/org.simantics.help.base/pdfbox-1.8.10-src.zip
deleted file mode 100644 (file)
index e05aa63..0000000
Binary files a/bundles/org.simantics.help.base/pdfbox-1.8.10-src.zip and /dev/null differ
diff --git a/bundles/org.simantics.help.base/pdfbox-1.8.10.jar b/bundles/org.simantics.help.base/pdfbox-1.8.10.jar
deleted file mode 100644 (file)
index 87bb9a7..0000000
Binary files a/bundles/org.simantics.help.base/pdfbox-1.8.10.jar and /dev/null differ
index c12e56b4d56e1c76bfa8e788097900dc2dac7c3e..43fac6c7079a114d92e99e690824c46262967969 100644 (file)
@@ -1,14 +1,14 @@
 package org.simantics.help.base.internal;\r
 \r
 import java.io.File;\r
-import java.io.FileInputStream;\r
 import java.io.IOException;\r
 \r
 import org.apache.pdfbox.cos.COSDocument;\r
+import org.apache.pdfbox.io.RandomAccessFile;\r
 import org.apache.pdfbox.pdfparser.PDFParser;\r
 import org.apache.pdfbox.pdmodel.PDDocument;\r
 import org.apache.pdfbox.pdmodel.PDDocumentInformation;\r
-import org.apache.pdfbox.util.PDFTextStripper;\r
+import org.apache.pdfbox.text.PDFTextStripper;\r
 import org.eclipse.help.search.ISearchDocument;\r
 \r
 /**\r
@@ -17,7 +17,7 @@ import org.eclipse.help.search.ISearchDocument;
 public class PDFUtil {\r
 \r
     public static void stripText(File fromPdf, ISearchDocument doc) throws IOException {\r
-        PDFParser parser = new PDFParser(new FileInputStream(fromPdf));\r
+        PDFParser parser = new PDFParser(new RandomAccessFile(fromPdf, "r"));\r
         parser.parse();\r
 \r
         try (COSDocument cosDoc = parser.getDocument()) {\r
diff --git a/bundles/org.simantics.help.base/xmpbox-1.8.10.jar b/bundles/org.simantics.help.base/xmpbox-1.8.10.jar
deleted file mode 100644 (file)
index 7a8a465..0000000
Binary files a/bundles/org.simantics.help.base/xmpbox-1.8.10.jar and /dev/null differ