Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package py3oconverter;
import com.sun.star.frame.XDesktop;
import com.sun.star.lang.XComponent;
import com.sun.star.io.ConnectException;
public class Launch {
/**
* @param args
*/
public static void main(String[] args) {
String port = "8997";
String host = "localhost";
Convertor c = new Convertor(host, port);
String source_file_path = "py3o_example.odt";
String target_file_path = "toto.pdf";
String filter_name = "writer_pdf_Export";
try{
c.convert(source_file_path, target_file_path, filter_name);
System.out.println("Conversion done");
}
catch(ConnectException e)
{
e.printStackTrace();
}
catch(Exception e)
{
e.printStackTrace();
}
System.exit(0);
}
}