I am looking at an alternative solution to docx4j. Docx4j has a insertHTML extension that facilitates conversion of XHTML to WordML. This allows for XHTML content to be formatted using styles defined within the Word template used for document conversion.
For example, if I insert some XHTML content:
“
This is the brown fox.”,
The p block inserted into the Word document at generation time would be styled normally (e.g. Word style = Normal), but the word brown would be adjusted using the “BrownText” style (also defined in Word). Is something like this possible? Would Aspose have an alternative approach to this?
Also, if referencing styles via XHTML is supported, does this include referencing table styles?
You can insert html in Word document using DocumentBuilder.InsertHtml(String) method. After that you can save final output to WordML format using the Document.Save method. Secondly, yes Aspose.Words can import from “class” attribute on HTML “paragraph” and “span” elements. Please refer to the following article:
It mentions that list and table styles are planned. Do you have any info on when that will be available? If not soon, is this something that could be supported? (i.e. paid development).
Thanks for your inquiry. We are striving hard to implement these new features in Aspose.Words API but unfortunately can’t provide you any reliable estimate at the moment. In general, Aspose.Words mimics the behavior of Microsoft Word when importing/exporting a HTML file. Please let us know if you have any troubles during importing HTML file and we will be glad to look into this further for you.
Best regards,
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.