Corrupted .docx file creation when text areas
Issue #323
resolved
Original issue 323 created by aurelien.tomass... on 2013-04-02T09:47:04.000Z:
- I created a word document with a text area, or with an object containing a text
- I open the file thanks to okapi, and just write it to an other file with the corresponding filter
- The generated file is corrupted and can't be open with word. When i open the file document.xml inside the docx, I can see the "</w:txbxContent>" and "</wps:txbx>" are closed at the beggining of the document, and open at the end. (cf. attachments : ".._out_auto.docx" is the generated one)
I am using okapi v0.19 on windows 64bits.
The corresponding code is:
OpenXMLFilter filter = new OpenXMLFilter();
filter.open(new RawDocument(uri, "UTF-8", LocaleId.fromString(src_lang)), false,false);
IFilterWriter writer = filter.createFilterWriter();
writer.setOptions(LocaleId.fromString(tgt_lang), "iso-8859-1");
writer.setOutput(ouput);
while ( filter!=null && filter.hasNext() ) {
Event event = filter.next();
writer.handleEvent(event);
}
filter.close();
writer.close();
Comments (2)
-
Account Deleted -
Account Deleted - changed status to resolved
Comment 2. originally posted by @ysavourel on 2013-07-01T13:43:24.000Z:
- Log in to comment
Comment 1. originally posted by @ysavourel on 2013-04-15T12:13:28.000Z: