mchilds83
unread,Nov 10, 2009, 2:05:09 PM11/10/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to JODConverter
Hi, I wrote a script which uses the JODConverter to recursively
convert all files in a directory hierarchy to PDF. There are about
2,800 word processor documents created 25-30 years ago. I am able to
read the files in MS Word 2007 if I choose "Western European (IA5)"
encoding. In OOo, "Unicode (UTF-7)" and "Unicode (UTF-8)" seem to be
the most compatible. My script is using a command like the following
to convert each file to a format that is readable in either PDF or a
more recent version of MS Word:
java -jar jodconverter-cli-2.2.2.jar -f pdf "C:\Users\mchilds\Documents
\Floppy Diskettes\86 09 18\83-85AGR.AGR"
This command seems to work fine for converting modern office documents
from one format to another, however these old documents have file
extensions that do not match up with any modern standard. Also, when
I attempt a conversion like this, I receive an error like the
following on most of the files:
10-Nov-2009 10:56:00 AM
com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection
connect
INFO: connected
10-Nov-2009 10:56:00 AM
com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection
disposing
INFO: disconnected
Exception in thread "main" java.lang.IllegalArgumentException: unknown
document format for file: C:\Users\mchilds\Documents\Floppy Diskettes
\86 09 18\83-85AGR.A
GR
at
com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.guessDocumentFormat
(AbstractOpenOfficeDocumentConverter.java:1
21)
at
com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert
(AbstractOpenOfficeDocumentConverter.java:93)
at
com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert
(AbstractOpenOfficeDocumentConverter.java:74)
at
com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert
(AbstractOpenOfficeDocumentConverter.java:70)
at com.artofsolving.jodconverter.cli.ConvertDocument.convertOne
(ConvertDocument.java:154)
at com.artofsolving.jodconverter.cli.ConvertDocument.main
(ConvertDocument.java:139)
Since OOo and MS Word can view these documents in an acceptable
format, is there a way for me to specify the input filter or encoding
and simply save it the way it appears in OOo or MS Word? I am really
hoping I can avoid having to resave nearly 3000 of these files one at
a time. Only about 12 of the 2,800 documents I ran the script on
converted successfully.
Thanks in advance for any help.
Mike