Duvida alinhamento!

Boa tarde tenho a seguinte linha de código:

rtfEditor.write(new FileOutputStream("temp.rtf"), editorPanePrincipal.getDocument(), 0, editorPanePrincipal.getDocument().getLength());

onde pego o texto no formato “RTF” do “editorPanePrincipal”, e gravo um “temp.rtf”, só que ele não salva o alinhamento.

Alguem teria alguma ideia do que fazer?

Grato.