Visagan S. wrote:
Few of my files while converting I get some java error. I have attached
one of the document for your reference. I tried copy pasting the content
to new word document and still the same issue. Please look into this.
Sure.
This bug should be fixed now. You'll find the bug fix in the next
version of W2X (probably next month).
This bug was triggered by an MS-Word field having an empty code.
Attached screenshot field_with_empty_field_code.png shows 2 fields,
first one, incorrect and useless, having an empty field and the other
one, 100% correct, having a "title" field.
Attached screenshot same_with_field_value_rather_than_field_codes.png
shows the normal MS-Word view, where field codes are invisible and field
values (e.g. the title of the document) are displayed.
The workaround for this bug is to use MS-Word in order to get rid of
these useless fields having an empty code.
*Error Message*
Converting "C:\Users\XXX\YYY\ZZZ.docx" to XHTML...
Conversion has failed:
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
+---------------------------------------
| java.lang.AbstractStringBuilder.charAt(Unknown Source)
| java.lang.StringBuilder.charAt(Unknown Source)
|
com.xmlmind.w2x.docx.toxhtml.SimplifyFields$ComplexField.trimLeft(SimplifyFields.java:147)
|
com.xmlmind.w2x.docx.toxhtml.SimplifyFields$ComplexField.simplify(SimplifyFields.java:97)
|
com.xmlmind.w2x.docx.toxhtml.SimplifyFields.simplify(SimplifyFields.java:223)
|
com.xmlmind.w2x.docx.toxhtml.SimplifyFields.simplify(SimplifyFields.java:244)
|
com.xmlmind.w2x.docx.toxhtml.SimplifyFields.process(SimplifyFields.java:35)
| com.xmlmind.w2x.docx.toxhtml.Translator.translate(Translator.java:636)
| com.xmlmind.w2x.processor.ConvertStep.process(ConvertStep.java:81)
| com.xmlmind.w2x.processor.Processor.executeSteps(Processor.java:1241)
| com.xmlmind.w2x.processor.Processor.process(Processor.java:1035)
| com.xmlmind.w2x_app.ConvertThread.run(ConvertThread.java:73)
+---------------------------------------
--
XMLmind Word To XML Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/w2x-support