I have following problem: I create a paragraph with a tabstop. The text in the paragraph should be underlined, but when the text is inserted in the paragraph, the whole line is underlined, not only the inserted text. Is there a way to remove the underline under the tabulator?
Code:
- Code: Select all
Paragraph paraInserted = new Paragraph(newDocument);
var tabs = paraInserted.Format.Tabs.AddTab(90);
tabs.Justification = TabJustification.Left;
tabs.TabLeader = TabLeader.NoLeader;
TextRange textRange1 = paraInserted.AppendText("\t" + txt);
textRange1.CharacterFormat.UnderlineStyle = UnderlineStyle.Single;
newDocument.Sections[0].Paragraphs.Insert(0, paraInserted);
Thanks!