Hello folks,
got a problem setting up a an application to use the document converter from
art of solving to convert ms word docs to pdf. I am not a java person so
apologies if it is a really dumb mistake, here is where I have gotten to:
1. Installed JODConverter from the war file using the tomcat admin/manager
in my download of OpenBD. Installed OpenOffice and gotten it running as a
service (as per instructions on JODConverter site)
2. Tested the installation using the directory and sample app set up by the
War file and it works.
3. Found some handy sample code and pasted it into my test page:
=============== Handy sample code =======================
<cfobject type="java"
class="com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter"
name="jodDocumentConverter">
<cfobject type="java"
class="com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection"
name="jodOpenOfficeConnection">
<cfobject type="java" class="java.io.File" name="jodFile">
<cfset inputFile =
jodFile.init("C:\openbd\tomcat\webapps\ROOT\codgeit\docxchange\uploads\myfile.doc")>
<cfset outputFile =
jodFile.init("C:\openbd\tomcat\webapps\ROOT\codgeit\docxchange\uploads\mydocument.pdf")>
<cfset jodOpenOfficeConnection.init("localhost", 8100)>
<cfset jodOpenOfficeConnection.connect()>
<cfset success = jodOpenOfficeConnection.isConnected()>
<cfif success EQ "YES">
<cfset jodDocumentConverter.init(jodOpenOfficeConnection)>
<cfset jodDocumentConverter.convert(inputFile, outputFile)>
</cfif>
<cfset disconn = jodOpenOfficeConnection.disconnect()>
================== End of handy sample code ================
When I try to run my sample code I get an error message:
*Failed to load class,
com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter
*I guess that I have the string to access the class wrong, anyone got any
pointers as I have very little knowledge of Java.
Any help appreciated
Herbie
--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
!! save a network - please trim replies before posting !!