Hi AndreyN
Thanks again for the quick response. This looks like a workaround but is probably not the most elegant way to come along with the issue. Let me explain our current situation in little more detail.
We have an HTML base Editor (implemented by an embedded browser), wich of course uses CSS for formatting that text during the editing. However, that CSS information is not stored within the article database, its pure xhtml instead. Then there are people responsible for the Documents which create a pure word template. Know the application I’am currently writing composes a final Word document using one or more Article (pure xhtml) knowing that for example a text within a
shall be converted into a paragraph using a style named “Silver” like Document.Styles[“Silver”] if such a Style exists within the Word Template.
I could use your approach by ripping apart an incoming pure xhtml document, inserting some trash css information so that the document builder realizes there is actualy some css information available so he creates those document styles. Then append the “Intermediate Document” built by the DocumentBuilder to the final document using ImportFormatMode.UseDestinationStyles.
This would propably work, looks to me however like a pretty nasty hack! :-p
Do you have another idea?
Best regards
Samuel Lörtscher