Also updated pdfbox version from 1.8.10 to 2.0.2.
Change-Id: I400d049f5d90f839b9075e4370bd565b642d756a
<?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
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: .
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
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
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