Pergunta

In MigraDoc, if I have a paragraph, how can I only bold some text in the paragraph, not the entire paragraph.

Edit: Below is the typical code I would use to add a bolded paragraph.

var paragraph = section.AddParagraph("This text");
paragraph.Format.Font.Bold = true;

I can't just add separate paragraphs splitting the text, because MigraDoc puts space between the paragraphs.

Foi útil?

Solução

Try the following lines:

var paragraph = section.AddParagraph("This text"); 

paragraph.AddFormattedText("Text in Bold Style", TextFormat.Bold); 
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top