- Code: Select all
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
Map<String,Style> map = StyleDefinitionsPart.getKnownStyles();
Collection<Style> col = map.values();
for(Style s : col)
{
wordMLPackage.getMainDocumentPart().getPropertyResolver().activateStyle(s);
}
wordMLPackage.getMainDocumentPart().getContent().addAll(XHTMLImporter.convert(xhtmlString.toString(), null, wordMLPackage));
what am I doing wrong?