0
J'essaie JODConverter pour convertir le fichier docx en pdf. J'utilise LibreOffice 5.3.4. J'ai essayé d'exécuter ce code mais j'obtiens une erreur voir ceci.JOD Convertisseur ne pas installer correctement
import org.artofsolving.jodconverter.OfficeDocumentConverter;
import org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration;
import org.artofsolving.jodconverter.office.OfficeManager;
import java.io.File;
public class PDF {
public static void main(String[] args) {
OfficeManager manager = new DefaultOfficeManagerConfiguration().buildOfficeManager();
manager.start();
OfficeDocumentConverter converter = new OfficeDocumentConverter(manager);
converter.convert(new File("E:/Project Synopsis.docx"), new File("E:/Project Synopsis.pdf"));
}
}
Exception in thread "main" java.lang.IllegalStateException: officeHome not set and could not be auto-detected
at org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration.buildOfficeManager(DefaultOfficeManagerConfiguration.java:163)
at com.company.PDF.main(PDF.java:12)
Le message est clair: 'officeHome pas réglé et ne pouvait pas être auto-detected' – Jens
comment définir plz expliquer en détail – CodingGeek