PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Formatting a word inside a paragraph text. https://forum.pdfsharp.net/viewtopic.php?f=2&t=188 |
Page 1 of 1 |
Author: | mr_kunaljain [ Thu Jul 05, 2007 9:50 am ] |
Post subject: | Formatting a word inside a paragraph text. |
Hi , Thanks for making a useful tool like PDFSharp. I am new to PDFsharp and have been using it for last 10-15 days. In one of my paragraph the string contents are from DB. These string values are to be shown in bold. I have used the following code to generate the pararaph in my PDF. string strPara; strPara = "Please submit this form, along with your resume, to the address below. You do not need to include anything else, because you have selected the " + strDeadline_Title + ", you must arrive at our office no later than " + Deadline_Date + " ! This is not a postmark deadline."; XTextFormatter oPara = new XTextFormatter(gfx); oPara.Alignment = XParagraphAlignment.Justify; oPara.DrawString(strPara, font, XBrushes.Black, new XRect(new XPoint(leftMargin, currentY - 10), new XSize(pageWidth - (leftMargin + rightMargin), 40))); The output of the above code is working fine. But now I need to show the value strDeadline_Title and Deadline_Date in BOLD in the PDF. Is there anyway that will make these 2 values appear bold in the paragraph and my paragraph appear Justified aligned. Note : the values from does not have fixed width. Please reply soon , it urgent .. Thanks Kunal |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |