I’m currently doing something similar to this (below is a much simplified version):
DocumentBuilder builder = new DocumentBuilder(new Document());
builder.insertHTML("<div style=“text-align: center;”>Centred
However, when the document is opened in Word the text is not centred. Changing the
tags does work however. Unfortunately, the HTML we’re writing out comes from a 3rd party and is outwith our control.
Can I check a few things:
1) is this a known defect?
2) are there any known workarounds (other than modifying the HTML?)
3) if this was raised as a bug could someone provide an estimate of when it would be resolved?