> How can I print a word document (without loosing format) in a Unix
> server from a java application?
http://jakarta.apache.org/poi/index.html
To do better, maybe you can get word format specs under NDA from
Microsoft. Good luck with that. I'm not being *too* cynical here.
I've worked for a company and for a university that each had a certain
amount of Microsoft source code, so who knows?
Maybe there's a Word Doc to PDF converter, at least that would give you
a known format.
Maybe there's a way to connect JNI to Winelib and use some Office DLL to
do the conversion. Or, connect to one of the commercial printer drivers
that converts Word to Postscript or PDF, and deal with the output. Or,
maybe you can connect an ActiveX control that can display a Word
document, and then screen scrape [I'm serious.]
But you are treading into territory where Microsoft has gone to great
lengths to prevent you from doing what you need to do. If your
documents are in Word97 doc format, and don't have too much (any) OLE or
weird formatting.
James McGill - 18 Apr 2006 19:33 GMT
> If your
> documents are in Word97 doc format, and don't have too much (any) OLE
> or
> weird formatting.
Sorry I didn't finish that last sentence.
Anyway, to paraphrase your question:
"I went to bed with the Devil, and now I'm looking for a way to remove
the pitchfork from my butt."
Oz - 19 Apr 2006 10:01 GMT
Hi James,
Thanks for your post. Perhaps you have a concrete solution for the
problem, if you have being working in a similar project? I was hopping
I could find an API or create a simple-medium java process to print the
.doc in UNIX, because I don't think with the budget I received I'm
going to be able to do anymore...
Any help will be more than welcome.
>How can I print a word document (without loosing format) in a Unix
>server from a java application?
The easiest way might be to set up an old clunker under Windows, and
write a little program on it that wakes up every once in a while
looking for files in its queue, and it is use EXEC to feed them to
word itself for printing. Your server then only has to put the files
in a directory on disk. It can once a day clear files more a day old,
or allow the windows program to delete once successfully printed.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Oz - 19 Apr 2006 09:56 GMT
Hi Roedy,
The only problem I see is that I don't have Windows. I run the
application under UNIX, and I am not allowed to have Open Office on it,
so not an easy issue...
Do you know any alternative?
Thanks in advance.
> >How can I print a word document (without loosing format) in a Unix
> >server from a java application?
[quoted text clipped - 9 lines]
> Canadian Mind Products, Roedy Green.
> http://mindprod.com Java custom programming, consulting and coaching.
Roedy Green - 20 Apr 2006 01:46 GMT
>The only problem I see is that I don't have Windows. I run the
>application under UNIX, and I am not allowed to have Open Office on it,
>so not an easy issue...
>Do you know any alternative?
Every business has a old klunker windows machines lying in a closet
somewhere. Just dig it out.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.