Hi Baala,
For the headings in Bold, this is like that in the default theme of Word 2010. If you want to customize your headings, I can only propose you to open Word, set the theme as you need and then save your document.
Embed that document inside a resx and use it inside your code:
For the inline style, at the time being, no style are supported. I will commit this feature soon but I need to finish other step.
But you can already now support text-align by adding this code in ProcessHeading:
For the headings in Bold, this is like that in the default theme of Word 2010. If you want to customize your headings, I can only propose you to open Word, set the theme as you need and then save your document.
Embed that document inside a resx and use it inside your code:
using (MemoryStream generatedDocument = new MemoryStream()) { byte[] data = Demo.Properties.Resources.template; generatedDocument.Write(data, 0, data.Length); generatedDocument.Position = 0L; using (WordprocessingDocument package = WordprocessingDocument.Open(generatedDocument, true)) { .... } }
But you can already now support text-align by adding this code in ProcessHeading:
List<OpenXmlElement> styleAttributes = new List<OpenXmlElement>(); htmlStyles.Paragraph.ProcessCommonAttributes(en, styleAttributes); AlternateProcessHtmlChunks(en, "</h" + level + ">"); Paragraph p = new Paragraph(elements); p.InsertInProperties(prop => prop.ParagraphStyleId = new ParagraphStyleId() { Val = htmlStyles.GetStyle(clsName, StyleValues.Paragraph) }); htmlStyles.Paragraph.ApplyTags(p); htmlStyles.Paragraph.EndTag("<h" + level + ">");