Free Support Forum - aspose.com

Setting Portion FontBold property

Hi All.



I am having an issue setting the FontBold property of a Portion using the code below -



Paragraph critDescBullsParaB = critDescBullsTF.Paragraphs[0];

Portion b = critDescBullsTF.Paragraphs[0].Portions[0];

b.Text = "bold text ";

b.FontBold = true;

b.FontUnderline = true;



The resulting text is underlined but not bold.



Anyone got any ideas if I’m missing something?



Cheers.



John

Hi John,

Thanks
for showing keen interest in Aspose.Slides.

During my test with the following code, I am unable to notice this issue. The version I am using is 4.1.0

[C#]

Presentation pres = new Presentation();

Slide sld = pres.Slides[0]; // pres.AddTitleSlide();

Aspose.Slides.Rectangle Header_rect = sld.Shapes.AddRectangle(420, 1345, 4900, 920);

//Hiding the lines of rectangle

Header_rect.LineFormat.ShowLines = false;

Header_rect.AddTextFrame("Hello world");

Header_rect.TextFrame.Paragraphs[0].Portions[0].FontUnderline = true;

Header_rect.TextFrame.Paragraphs[0].Portions[0].FontBold = true;

//Writing the presentation as a PPT file

pres.Write("C:\\modified.ppt");

Hi Mudassir.



Thanks for responding so quickly…



Seems to be an issue with which version of Powerpoint used to view the presentation. Using the Powerpoint viewer or Open Office (v2.2 and v3) the bold is not honored but the underline is. Using Office 2008 for Mac the bold and the underline is honored.



Not sure exactly how to proceed with this…



Cheers.



John

Hi John,


Thanks for showing keen interest in Aspose.Slides.


I have been able to verify yours specified issue and found that “Font Bold” property is not working when viewing the presentation in both PowerPoint Viewer and Open Office. An issue with issue id 14179 has been created on our Issue Tracking System to fix the problem. This thread has been associated with this issue, so that you can be automatically notified as soon as this issue is resolved.


Thanks and Regards,