Index: TXM/trunk/org.txm.libs.deptreeviz/src/org/txm/libs/deptreeviz/UDPrintTree.java
===================================================================
--- TXM/trunk/org.txm.libs.deptreeviz/src/org/txm/libs/deptreeviz/UDPrintTree.java	(revision 3527)
+++ TXM/trunk/org.txm.libs.deptreeviz/src/org/txm/libs/deptreeviz/UDPrintTree.java	(revision 3528)
@@ -8,7 +8,6 @@
 import java.util.Arrays;
 import java.util.List;
 
-
 import io.gitlab.nats.deptreeviz.DepTree;
 import io.gitlab.nats.deptreeviz.SimpleParse;
 import io.gitlab.nats.deptreeviz.SimpleWord;
@@ -16,6 +15,7 @@
 public class UDPrintTree {
 	
 	public static File print(File file, List<String> conll, String[] Tvalues, String[] NTvalues) {
+		
 		try {
 			PrintWriter pw = new PrintWriter(file);
 			
@@ -24,27 +24,27 @@
 			List<String> labels = p.getVerticesLabels().get("SYN");
 			if (Tvalues != null && Tvalues.length == words.size()) {
 				
-				for (int i = 0 ; i < words.size() ; i++) {
+				for (int i = 0; i < words.size(); i++) {
 					SimpleWord w = words.get(i);
 					
 					Field fword = SimpleWord.class.getDeclaredField("word");
 					fword.setAccessible(true);
-					fword.set(w, w.getWord()+"/"+Tvalues[i]);
+					fword.set(w, w.getWord() + "/" + Tvalues[i]);
 				}
 			}
 			
 			if (NTvalues != null && NTvalues.length == words.size()) {
-				ArrayList<String> tmp = (ArrayList)labels;
+				ArrayList<String> tmp = (ArrayList) labels;
 				tmp.clear();
-				for (int i = 0 ; i < words.size() ; i++) {
+				for (int i = 0; i < words.size(); i++) {
 					tmp.add(NTvalues[i]);
 				}
 			}
 			DepTree<SimpleParse, SimpleWord> dt = new DepTree<SimpleParse, SimpleWord>(p);
-			//dt.setShowingReferent(true);
-			//dt.setShowingCat(true);
+			// dt.setShowingReferent(true);
+			// dt.setShowingCat(true);
 			dt.writeTree(pw);
-			//w.close();
+			// w.close();
 			return file;
 		}
 		catch (Throwable e) {
@@ -55,20 +55,20 @@
 	}
 	
 	public static void main(String[] args) throws IOException {
-			File file = File.createTempFile("txm", ".svg", new File("/home/mdecorde"));
-			
-			List<String> conll = Arrays.asList(
-					"1	Ce	ce	PRON	_	Number=Sing|Person=3|PronType=Dem	2	nsubj	_	_",
-					"2	doit	devoir	VERB	_	Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin	0	root	_	_",
-					"3	être	être	AUX	_	VerbForm=Inf	5	cop	_	_",
-					"4	un	un	DET	_	Definite=Ind|Gender=Masc|Number=Sing|PronType=Art	5	det	_	_",
-					"5	général	général	NOUN	_	Gender=Masc|Number=Sing	2	xcomp	_	_",
-					"6	étranger	étranger	ADJ	_	Gender=Masc|Number=Sing	5	amod	_	_",
-					"7	.	.	PUNCT	_	_	2	punct	_	_"
-					);
 		
-			
-			System.out.println("FILE: "+print(file, conll, null, null));
+		File file = File.createTempFile("txm", ".svg", new File("/home/mdecorde"));
+		
+		List<String> conll = Arrays.asList(
+				"1	Ce	ce	PRON	_	Number=Sing|Person=3|PronType=Dem	2	nsubj	_	_",
+				"2	doit	devoir	VERB	_	Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin	0	root	_	_",
+				"3	être	être	AUX	_	VerbForm=Inf	5	cop	_	_",
+				"4	un	un	DET	_	Definite=Ind|Gender=Masc|Number=Sing|PronType=Art	5	det	_	_",
+				"5	général	général	NOUN	_	Gender=Masc|Number=Sing	2	xcomp	_	_",
+				"6	étranger	étranger	ADJ	_	Gender=Masc|Number=Sing	5	amod	_	_",
+				"7	.	.	PUNCT	_	_	2	punct	_	_");
+		
+		
+		System.out.println("FILE: " + print(file, conll, null, null));
 	}
 	
 }
Index: TXM/trunk/org.txm.core/src/java/org/txm/core/results/TXMResult.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 3527)
+++ TXM/trunk/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 3528)
@@ -1,5 +1,6 @@
 package org.txm.core.results;
 
+import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Constructor;
@@ -1185,11 +1186,11 @@
 	}
 	
 	/**
-	 * 
+	 *  load or reload parameters from the preference store node
 	 * @return
 	 * @throws Exception
 	 */
-	protected boolean autoLoadParametersFromAnnotations() throws Exception {
+	public boolean autoLoadParametersFromAnnotations() throws Exception {
 		return this.autoLoadParametersFromAnnotations(Parameter.COMPUTING) && this.autoLoadParametersFromAnnotations(Parameter.INTERNAL);
 	}
 	
@@ -2076,8 +2077,8 @@
 			}
 			clone = this.getClass().getDeclaredConstructor(String.class).newInstance(newNodePath);
 			
-			System.out.println("CLONE HAS BEEN COMPUTED? " + clone.hasBeenComputedOnce());
-			System.out.println("CLONE IS DIRTY? " + clone.isDirty());
+			//System.out.println("CLONE HAS BEEN COMPUTED? " + clone.hasBeenComputedOnce());
+			//System.out.println("CLONE IS DIRTY? " + clone.isDirty());
 			
 			if (all) {
 				for (TXMResult child : this.children) {
@@ -2095,7 +2096,9 @@
 	public boolean importParameters(File parameters) {
 		try {
 			Properties props = new Properties();
-			props.load(IOUtils.getReader(parameters));
+			BufferedReader r = IOUtils.getReader(parameters);
+			props.load(r);
+			r.close();
 			
 			// some tests before...
 			String className = props.getProperty(TXMPreferences.CLASS);
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/pdf/PDF2TXTMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/pdf/PDF2TXTMacro.groovy	(revision 0)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/pdf/PDF2TXTMacro.groovy	(revision 3528)
@@ -0,0 +1,75 @@
+package org.txm.macro.pdf
+// STANDARD DECLARATIONS
+
+import org.kohsuke.args4j.*
+import groovy.transform.Field
+import org.txm.rcp.swt.widget.parameters.*
+import org.apache.pdfbox.Loader
+import org.apache.pdfbox.text.PDFTextStripper
+
+// WARNING THIS MACRO NEEDS THE INSTALLATION OF THE PDFBOX (https://pdfbox.apache.org) Java library: https://dlcdn.apache.org/pdfbox/3.0.0-alpha3/pdfbox-app-3.0.0-alpha3.jar (standalone library)
+
+// BEGINNING OF PARAMETERS
+
+@Field @Option(name="input_file", usage=".pdf input file", widget="File", required=true, def="")
+		def input_file
+
+@Field @Option(name="input_dir", usage="The directory containing the .pdf files to read", widget="Folder", required=false, def="")
+		def input_dir
+
+// Open the parameters input dialog box
+if (!ParametersDialog.open(this)) return
+
+	// END OF PARAMETERS
+
+	if (input_dir != null && input_dir.exists() && input_dir.isDirectory()) {
+		
+		nFiles = 0
+		input_dir.eachFileMatch(~/.*.pdf/) { f ->
+			name = f.getName()
+			println "Processing $name..."
+			idx = name.lastIndexOf(".")
+			if (idx > 0) name = name.substring(0, idx)
+			outputFile = new File(f.getParentFile(), name + ".txt")
+			
+			pdfFile = f.getAbsolutePath()
+			if (pdfFile.toUpperCase().endsWith(".PDF")) {
+				textFile = pdfFile.substring(0, pdfFile.length() - 3) + "txt"
+				try {
+					outputFile.withWriter("UTF-8") { writer ->
+						doc = Loader.loadPDF(f)
+						strip = new PDFTextStripper()
+						writer.print strip.getText(doc)
+						doc.close()
+						writer.close()
+						nFiles++
+					}
+				} catch (Exception e) {
+					e.printStackTrace()
+				}
+			}
+		}
+		println "Done processed $nFiles files."
+	} else if (input_file != null && input_file.exists() && input_file.isFile()) {
+		
+		name = input_file.getName()
+		idx = name.lastIndexOf(".")
+		if (idx > 0) name = name.substring(0, idx)
+		outputFile = new File(input_file.getParentFile(), name + ".txt")
+		
+		pdfFile = input_file.getAbsolutePath()
+		if (pdfFile.toUpperCase().endsWith(".PDF")) {
+			textFile = pdfFile.substring(0, pdfFile.length() - 3) + "txt"
+			try {
+				outputFile.withWriter("UTF-8") { writer ->
+					doc = Loader.loadPDF(input_file)
+					strip = new PDFTextStripper()
+					writer.print strip.getText(doc)
+					doc.close()
+					writer.close()
+				}
+			} catch (Exception e) {
+				e.printStackTrace()
+			}
+		}
+	}
