using (DocX document = DocX.Load("Test.docx")) { if (document.Paragraphs.Count() > 0) { for (int i = 0; i < document.Paragraphs.Count; i++) { Novacode.Paragraph pg = document.Paragraphs[i]; Console.WriteLine("Text:" + pg.Text +" Alignment:" + pg.Alignment + " Direction:" + pg.Direction); //how get FontName-FontSize } } }
foreach (var mt in pg.MagicText) { if (mt == null) continue; if (mt.formatting != null) { FontName = mt.formatting.FontFamily.Name.ToString(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)