We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Lable Bold

this is my code : Aspose.Pdf.Text.TextFragment BhcNamedata = new Aspose.Pdf.Text.TextFragment("BHC Name: " + introData.BHCName.ToString());


in the above code how to make "BHC Name: " lable to bold ?

ex: BHC Name: City National Bancshares, Inc.

Hi there,


Thanks for your inquriy. Please use following sample code snippet for your requirements.

// Create Graph instance<o:p></o:p>

Aspose.Pdf.Text.TextFragment BhcNamedata = new Aspose.Pdf.Text.TextFragment();

TextSegment seg1= new TextSegment("BHC Name: ");

seg1.TextState.FontStyle = FontStyles.Bold;

TextSegment seg2= new TextSegment(DateTime.Now.ToString());

BhcNamedata.Segments.Add(seg1);

BhcNamedata.Segments.Add(seg2);

page.Paragraphs.Add(BhcNamedata);

Please feel free to contact us for any further assistance.


Best Regards,