I am trying to figure out how I would do this. I have a manually generated PDF that I am creating from a list of records from a Database, and for example, I have a Title, Institution, and Text Field.
I want to be able to have the title be bold and say font size 14, and then on the same line right after and then have an optional reference to the Institutiion on the same line in font size 12 and normal. After that, have the main text body in 12 normal/. I am able to do this where title and institution are on separate lines, but I want them as part of the same line. I have tried in the past creating two text fragments applying different formats to these segments and then concatenating and adding them, but when I do so, I lose the formatting on the second text fragment (it is the same as the first) Instead of page.Paragraphs.Add I am looking for something like page.Paragraphs.Append which will continue to add the text right after the previous add. What I am looking for would produce
This is a Section Title (For DFCI only)
This is the body of the text blah blah blah blah
A snippet of the code which works for what i want but does 3 lines and I want two is
Aspose.Pdf.Text.TextFragment sectTitle = new Aspose.Pdf.Text.TextFragment(rowTitle.ToString());
sectTitle.TextState.FontStyle = Aspose.Pdf.Text.FontStyles.Bold;
page.Paragraphs.Add(new Aspose.Pdf.Text.TextFragment(" (For DFCI only) “));