I've document and I want to change all template parameters like {name}, {address} to my own values. I tried to use POI HWPF Library, but I lost document formatting after saving. Even when I open my MS Word document with POI and save it (without any changes) document formatting is lost:) Formatting means centering, font size, etc (there are no any tables or pictures - just 'plain text').
What library I can use for this case? Maybe anyone have expirience with MS Word documents and java. Requirements: Open Source, Without using any Windows COM components (muliplatform), Not OOXML - Microsoft Word XP 2003.
There are similar question (about truncating document after saving) Java: parsing ms-word document using POI/HWPF
I can't tell from own experience, but have you tried the OOo Java API's? From what I've heard and seen is that they're very good and flexible. And that not only for MS Word documents.
Give it a try.