

JODConverter also creates a ChangeLog.txt. JODConverter can pretty much convert any MIME type supported by OpenOffice. ("-"+inputFile.canRead()) Ĭnvert(inputFile, outputFile) OpenOfficeConnection connection = new SocketOpenOfficeConnection(8100) ĭocumentConverter converter = new OpenOfficeDocumentConverter(connection)

Import .converter.* įile inputFile = new File("OriginalDoc.doc") įile outputFile = new File("Converted.pdf")

You can now either run the converter from command line where the JODConverter is installed by (java -jar jodconverter-cli-2.2.1.jar ) or you can use the code below to customize as needed:

Start the JODConverter service by typing in: soffice -headless -accept="socket,host=127.0.0.1,port=8100 urp " -nofirststartwizardĥ. Open command prompt and Type: CD C:\Program Files\ 2.4\program or whatever your openoffice path is.Ĥ. It is free and available at: JODConverter uses OpenOffice API to perform conversions.ģ. Make sure you have a OpenOffice installed on your machine. I tried running the program and i am getting the following exception.Ģ:41:14 PM .connection.AbstractOpenOfficeConnection connectĮxception in thread "main" .connection.OpenOfficeException: conversion failed: could not save output document OOo errorCode: 3088Īt .(OpenOfficeDocumentConverter.java:142)Īt .(OpenOfficeDocumentConverter.java:120)Īt .(AbstractOpenOfficeDocumentConverter.java:104)Īt .(AbstractOpenOfficeDocumentConverter.java:74)Īt .(AbstractOpenOfficeDocumentConverter.java:70)Īt DocConverter.main(DocConverter.java:16)Ĭaused by: .ErrorCodeIOException:Īt .remoteUnoRequestRaisedException(Job.java:187)Īt .execute(Job.java:153)Īt .enter(JobQueue.java:349)Īt .enter(JobQueue.java:318)Īt .enter(JavaThreadPool.java:106)Īt ._remote.java_remote_ndRequest(java_remote_bridge.java:657)Īt ._remote.ProxyFactory$Handler.request(ProxyFactory.java:159)Īt ._remote.ProxyFactory$Handler.invoke(ProxyFactory.java:141)Īt .(OpenOfficeDocumentConverter.java:156)Īt .(OpenOfficeDocumentConverter.java:140)Ģ. 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.9K Oracle Database Express Edition (XE).3.8K Java and JavaScript in the Database.
