View previous topic :: View next topic |
Author |
Message |
gdi
Joined: 11 Mar 2008 Posts: 2
|
Posted: Tue Mar 11, 2008 11:16 am Post subject: MigraDoc: Formatting a single word within a pargraph |
|
|
Is it possible to format a single word within a paragraph, for example to make one word bold oder underlined? |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Tue Mar 11, 2008 1:36 pm Post subject: |
|
|
Yes.
Call the AddFormattedText method of the paragraph object.
Here's a code fragment:
Code: |
paragraph = section.Footers.EvenPage.AddParagraph();
paragraph.AddFormattedText("I'm bold.", TextFormat.Bold);
paragraph.AddFormattedText("I'm not bold.", TextFormat.NotBold);
FormattedText ft =
paragraph.AddFormattedText("I'm bold.", TextFormat.Bold);
ft.Font.Size = 6;
|
_________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
gdi
Joined: 11 Mar 2008 Posts: 2
|
Posted: Tue Mar 11, 2008 2:00 pm Post subject: |
|
|
Thanks a lot. |
|
Back to top |
|
|
|