Having a Scanner on System.in in another thread breaks jodconverter, to reproduce do something like this:
Code
```java
public class Main{
public static void main(){
new ConsoleInputThread().start();
Office.main(null); // This will fail by timeouting, and succed if placed before the above statement
}
public class ConsoleInputThread extends Thread{
@Override
public void run() {
try{
Scanner scanner = new Scanner(System.in);
System.out.println(this.getName()+" started. Enter 'help' or '?' for all commands.");
while(true){
String l = scanner.nextLine();
if(l.contains("help") || l.contains("?")) {
System.out.println("Commands:");
System.out.println("stop/exit | Stops the application gracefully.");
System.out.println("add admin | Creates a new admin account.");
System.out.println("make admin | Makes an existing account admin.");
}
// ...
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class Office {
public static void init(){
// static constructor is executed
}
public static void main(String[] args) throws IOException, OfficeException {
for (int i = 0; i < 20; i++) {
File pdf = new File(System.getProperty("user.dir")+"/test.odt");
byte[] data = createWordDocxPreview(new FileInputStream(pdf), DefaultDocumentFormatRegistry.ODT);
File png = new File(System.getProperty("user.dir")+"/test.png");
png.delete();
png.createNewFile();
Files.write(png.toPath(), data);
}
}
// Create an office manager using the default configuration.
// The default port is 2002. Note that when an office manager
// is installed, it will be the one used by default when
// a converter is created.
final public static File workingDir = new File(System.getProperty("user.dir")+"/office");
public static LocalOfficeManager officeManager;
static{
// Start an office process and connect to the started instance (on port 2002).
try {
workingDir.mkdirs();
officeManager = LocalOfficeManager.builder().install().workingDir(workingDir).build();
officeManager.start();
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
try {
officeManager.stop();
} catch (OfficeException e) {
AL.warn(e);
}
}));
} catch (Exception e) {
AL.warn(e);
}
}
/**
* @param inputFile document.docx
* @param fileFormat
* @return document.png preview image bytes.
*/
public static synchronized byte[] createWordDocxPreview(InputStream inputFile, DocumentFormat fileFormat) throws OfficeException {
if(fileFormat == DefaultDocumentFormatRegistry.PNG) throw new RuntimeException("Already a .png file!");
final ByteArrayOutputStream outputFile = new ByteArrayOutputStream();
// Create a page selector filter in order to
// convert only the first page.
final PagesSelectorFilter selectorFilter = new PagesSelectorFilter(1);
LocalConverter
.builder()
.filterChain(selectorFilter)
.build()
.convert(inputFile)
.as(fileFormat)
.to(outputFile)
.as(DefaultDocumentFormatRegistry.PNG)
.execute();
return outputFile.toByteArray();
}
public static Set formats = new HashSet<>();
static{
final DocumentFormatRegistry ref = DefaultDocumentFormatRegistry.getInstance();
formats.addAll(ref.getOutputFormats(DocumentFamily.TEXT));
//logSupportedGroupFormats("Supported Text Document Formats are:", formats);
formats.addAll(ref.getOutputFormats(DocumentFamily.SPREADSHEET));
//logSupportedGroupFormats("Supported SpreadSheet Document Formats are:", formats);
formats.addAll(ref.getOutputFormats(DocumentFamily.PRESENTATION));
//logSupportedGroupFormats("Supported Presentation Document Formats are:", formats);
formats.addAll(ref.getOutputFormats(DocumentFamily.DRAWING));
}
/**
* @param fileExtension like .odt for example.
* @return true if supported format
*/
public static DocumentFormat getFormatForFileExtension(String fileExtension){
fileExtension = fileExtension.replaceAll("\\.", "");
for (DocumentFormat format : formats) {
for (String extension : format.getExtensions()) {
if(extension.equals(fileExtension)) return format;
}
}
return null;
}
/**
* @param fileExtension like .odt for example.
* @return true if supported format
*/
public static boolean isSupported(String fileExtension){
return getFormatForFileExtension(fileExtension) != null;
}
}
}
```
Log
```sh
Thread-0 started. Enter 'help' or '?' for all commands.
2024-05-20 14:39:26.085 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeDescriptor - soffice info (from exec path): Product: LibreOffice - Version: ??? - useLongOptionNameGnuStyle: true
2024-05-20 14:39:26.173 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Starting process with --accept 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' and profileDir 'D:\Coding\JAVA\daniel_manager\office\.jodconverter_socket_host-127.0.0.1_port-2002_tcpNoDelay-1'
Entity: line 1: parser error : Document is empty
^
2024-05-20 14:39:30.644 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeConnection - Connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2024-05-20 14:39:30.645 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Started process; pid: 14908
2024-05-20 14:39:30.646 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:41:26.174 [main] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Restarting due to task timeout...
2024-05-20 14:41:26.174 [main] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Trying to forcibly terminate process: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager'; pid: 14908
Exception in thread "main" org.jodconverter.core.office.OfficeException: Task did not complete within timeout (120000 ms): LocalConversionTask{source=SourceDocumentSpecsFromInputStream{file=null, format=odt}, loadProperties={ReadOnly=true, Hidden=true, UpdateDocMode=0}, target=TargetDocumentSpecsFromOutputStream{file=null, format=png}, storeProperties=null, useStreamAdapters=false}
at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.waitTaskCompletion(AbstractOfficeManagerPoolEntry.java:120)
at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.execute(AbstractOfficeManagerPoolEntry.java:86)
at org.jodconverter.core.office.AbstractOfficeManagerPool.execute(AbstractOfficeManagerPool.java:216)
at org.jodconverter.local.LocalConverter$LocalConversionJob.doExecute(LocalConverter.java:188)
at org.jodconverter.core.job.AbstractConversionJob.execute(AbstractConversionJob.java:63)
at com.osiris.danielmanager.utils.Office.createWordDocxPreview(Office.java:81)
at com.osiris.danielmanager.utils.Office.main(Office.java:27)
at com.osiris.danielmanager.Application.main(Application.java:35)
Caused by: java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204)
at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.waitTaskCompletion(AbstractOfficeManagerPoolEntry.java:95)
... 7 more
2024-05-20 14:41:26.277 [MessageDispatcher] INFO org.jodconverter.local.office.OfficeConnection - Disconnected from 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2024-05-20 14:41:26.277 [MessageDispatcher] WARN org.jodconverter.local.office.LocalOfficeManagerPoolEntry - Connection lost unexpectedly; attempting restart
2024-05-20 14:41:26.277 [MessageDispatcher] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Restarting due to lost connection...
2024-05-20 14:41:26.277 [jodconverter-poolentry-1] ERROR org.jodconverter.local.task.LocalConversionTask - Local conversion failed.
com.sun.star.lang.DisposedException
at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:210)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:330)
at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:303)
at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:87)
at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:636)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:146)
at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:128)
at jdk.proxy2/jdk.proxy2.$Proxy8.loadComponentFromURL(Unknown Source)
at org.jodconverter.local.task.AbstractLocalOfficeTask.loadDocumentFromURL(AbstractLocalOfficeTask.java:240)
at org.jodconverter.local.task.AbstractLocalOfficeTask.loadDocument(AbstractLocalOfficeTask.java:204)
at org.jodconverter.local.task.LocalConversionTask.execute(LocalConversionTask.java:129)
at org.jodconverter.local.office.LocalOfficeManagerPoolEntry.doExecute(LocalOfficeManagerPoolEntry.java:121)
at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.lambda$execute$0(AbstractOfficeManagerPoolEntry.java:81)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.io.IOException: com.sun.star.io.IOException: java.net.SocketException: Connection reset
at com.sun.star.lib.uno.bridges.java_remote.XConnectionInputStream_Adapter.read(XConnectionInputStream_Adapter.java:70)
at java.base/java.io.DataInputStream.readFully(DataInputStream.java:208)
at java.base/java.io.DataInputStream.readInt(DataInputStream.java:385)
at com.sun.star.lib.uno.protocols.urp.urp.readBlock(urp.java:355)
at com.sun.star.lib.uno.protocols.urp.urp.readMessage(urp.java:92)
at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:105)
2024-05-20 14:41:26.277 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Process exited with code 1
2024-05-20 14:41:26.292 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeDescriptor - soffice info (from exec path): Product: LibreOffice - Version: ??? - useLongOptionNameGnuStyle: true
2024-05-20 14:41:26.375 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Starting process with --accept 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' and profileDir 'D:\Coding\JAVA\daniel_manager\office\.jodconverter_socket_host-127.0.0.1_port-2002_tcpNoDelay-1'
Entity: line 1: parser error : Document is empty
^
2024-05-20 14:41:30.673 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeConnection - Connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2024-05-20 14:41:30.673 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Started process; pid: 5176
// etc...
```
Log (if before console input thread init)
```sh
2024-05-20 14:44:34.111 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeDescriptor - soffice info (from exec path): Product: LibreOffice - Version: ??? - useLongOptionNameGnuStyle: true
2024-05-20 14:44:34.232 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Starting process with --accept 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' and profileDir 'D:\Coding\JAVA\daniel_manager\office\.jodconverter_socket_host-127.0.0.1_port-2002_tcpNoDelay-1'
Entity: line 1: parser error : Document is empty
^
2024-05-20 14:44:38.691 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeConnection - Connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1'
2024-05-20 14:44:38.691 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Started process; pid: 5836
2024-05-20 14:44:38.692 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:40.554 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:40.685 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:40.816 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:40.932 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:41.055 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:41.173 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:41.299 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:41.422 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:41.556 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:41.660 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:41.768 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:41.860 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:41.960 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:42.077 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:42.193 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:42.302 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:42.438 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:42.555 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
2024-05-20 14:44:42.725 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]...
```
I have OpenOffice and LibreOffice installed.
Not sure why it uses LibreOffice, even though I am using the default jodconverter version which should only work with OpenOffice as I understood. Just to be sure, I tried out jodconverter-local-lo too, same results.
Having a Scanner on System.in in another thread breaks jodconverter, to reproduce do something like this:
Code
```java public class Main{ public static void main(){ new ConsoleInputThread().start(); Office.main(null); // This will fail by timeouting, and succed if placed before the above statement } public class ConsoleInputThread extends Thread{ @Override public void run() { try{ Scanner scanner = new Scanner(System.in); System.out.println(this.getName()+" started. Enter 'help' or '?' for all commands."); while(true){ String l = scanner.nextLine(); if(l.contains("help") || l.contains("?")) { System.out.println("Commands:"); System.out.println("stop/exit | Stops the application gracefully."); System.out.println("add adminLog
```sh Thread-0 started. Enter 'help' or '?' for all commands. 2024-05-20 14:39:26.085 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeDescriptor - soffice info (from exec path): Product: LibreOffice - Version: ??? - useLongOptionNameGnuStyle: true 2024-05-20 14:39:26.173 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Starting process with --accept 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' and profileDir 'D:\Coding\JAVA\daniel_manager\office\.jodconverter_socket_host-127.0.0.1_port-2002_tcpNoDelay-1' Entity: line 1: parser error : Document is empty ^ 2024-05-20 14:39:30.644 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeConnection - Connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' 2024-05-20 14:39:30.645 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Started process; pid: 14908 2024-05-20 14:39:30.646 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:41:26.174 [main] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Restarting due to task timeout... 2024-05-20 14:41:26.174 [main] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Trying to forcibly terminate process: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager'; pid: 14908 Exception in thread "main" org.jodconverter.core.office.OfficeException: Task did not complete within timeout (120000 ms): LocalConversionTask{source=SourceDocumentSpecsFromInputStream{file=null, format=odt}, loadProperties={ReadOnly=true, Hidden=true, UpdateDocMode=0}, target=TargetDocumentSpecsFromOutputStream{file=null, format=png}, storeProperties=null, useStreamAdapters=false} at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.waitTaskCompletion(AbstractOfficeManagerPoolEntry.java:120) at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.execute(AbstractOfficeManagerPoolEntry.java:86) at org.jodconverter.core.office.AbstractOfficeManagerPool.execute(AbstractOfficeManagerPool.java:216) at org.jodconverter.local.LocalConverter$LocalConversionJob.doExecute(LocalConverter.java:188) at org.jodconverter.core.job.AbstractConversionJob.execute(AbstractConversionJob.java:63) at com.osiris.danielmanager.utils.Office.createWordDocxPreview(Office.java:81) at com.osiris.danielmanager.utils.Office.main(Office.java:27) at com.osiris.danielmanager.Application.main(Application.java:35) Caused by: java.util.concurrent.TimeoutException at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:204) at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.waitTaskCompletion(AbstractOfficeManagerPoolEntry.java:95) ... 7 more 2024-05-20 14:41:26.277 [MessageDispatcher] INFO org.jodconverter.local.office.OfficeConnection - Disconnected from 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' 2024-05-20 14:41:26.277 [MessageDispatcher] WARN org.jodconverter.local.office.LocalOfficeManagerPoolEntry - Connection lost unexpectedly; attempting restart 2024-05-20 14:41:26.277 [MessageDispatcher] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Restarting due to lost connection... 2024-05-20 14:41:26.277 [jodconverter-poolentry-1] ERROR org.jodconverter.local.task.LocalConversionTask - Local conversion failed. com.sun.star.lang.DisposedException at com.sun.star.lib.uno.environments.remote.JobQueue.removeJob(JobQueue.java:210) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:330) at com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:303) at com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:87) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:636) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:146) at com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:128) at jdk.proxy2/jdk.proxy2.$Proxy8.loadComponentFromURL(Unknown Source) at org.jodconverter.local.task.AbstractLocalOfficeTask.loadDocumentFromURL(AbstractLocalOfficeTask.java:240) at org.jodconverter.local.task.AbstractLocalOfficeTask.loadDocument(AbstractLocalOfficeTask.java:204) at org.jodconverter.local.task.LocalConversionTask.execute(LocalConversionTask.java:129) at org.jodconverter.local.office.LocalOfficeManagerPoolEntry.doExecute(LocalOfficeManagerPoolEntry.java:121) at org.jodconverter.core.office.AbstractOfficeManagerPoolEntry.lambda$execute$0(AbstractOfficeManagerPoolEntry.java:81) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: java.io.IOException: com.sun.star.io.IOException: java.net.SocketException: Connection reset at com.sun.star.lib.uno.bridges.java_remote.XConnectionInputStream_Adapter.read(XConnectionInputStream_Adapter.java:70) at java.base/java.io.DataInputStream.readFully(DataInputStream.java:208) at java.base/java.io.DataInputStream.readInt(DataInputStream.java:385) at com.sun.star.lib.uno.protocols.urp.urp.readBlock(urp.java:355) at com.sun.star.lib.uno.protocols.urp.urp.readMessage(urp.java:92) at com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge$MessageDispatcher.run(java_remote_bridge.java:105) 2024-05-20 14:41:26.277 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Process exited with code 1 2024-05-20 14:41:26.292 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeDescriptor - soffice info (from exec path): Product: LibreOffice - Version: ??? - useLongOptionNameGnuStyle: true 2024-05-20 14:41:26.375 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Starting process with --accept 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' and profileDir 'D:\Coding\JAVA\daniel_manager\office\.jodconverter_socket_host-127.0.0.1_port-2002_tcpNoDelay-1' Entity: line 1: parser error : Document is empty ^ 2024-05-20 14:41:30.673 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeConnection - Connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' 2024-05-20 14:41:30.673 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Started process; pid: 5176 // etc... ```Log (if before console input thread init)
```sh 2024-05-20 14:44:34.111 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeDescriptor - soffice info (from exec path): Product: LibreOffice - Version: ??? - useLongOptionNameGnuStyle: true 2024-05-20 14:44:34.232 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Starting process with --accept 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' and profileDir 'D:\Coding\JAVA\daniel_manager\office\.jodconverter_socket_host-127.0.0.1_port-2002_tcpNoDelay-1' Entity: line 1: parser error : Document is empty ^ 2024-05-20 14:44:38.691 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.OfficeConnection - Connected: 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' 2024-05-20 14:44:38.691 [jodconverter-offprocmng-0] INFO org.jodconverter.local.office.LocalOfficeProcessManager - Started process; pid: 5836 2024-05-20 14:44:38.692 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:40.554 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:40.685 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:40.816 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:40.932 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:41.055 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:41.173 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:41.299 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:41.422 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:41.556 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:41.660 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:41.768 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:41.860 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:41.960 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:42.077 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:42.193 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:42.302 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:42.438 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:42.555 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... 2024-05-20 14:44:42.725 [jodconverter-poolentry-1] INFO org.jodconverter.local.task.LocalConversionTask - Executing local conversion task [odt -> png]... ```I have OpenOffice and LibreOffice installed. Not sure why it uses LibreOffice, even though I am using the default jodconverter version which should only work with OpenOffice as I understood. Just to be sure, I tried out jodconverter-local-lo too, same results.