Changing BulletHeight does not apply

Hi,

it seems it is not possble to change the Paragraph.BulletHeight. Could you please have a look into this.

Regards

Lars

//Instantiate Presentation class

Presentation pres = new Presentation();

//Get first slide

Slide sld = pres.GetSlideByPosition(1);

//Add a Rectangle shape to the slide

Aspose.Slides.Rectangle rect = sld.Shapes.AddRectangle(500, 500, 1500, 200);

//Add a TextFrame to the Rectangle

TextFrame tf = rect.AddTextFrame("");

tf.Paragraphs.Clear();

Paragraph para = new Paragraph();

tf.Paragraphs.Add(para);

Portion port = new Portion();

para.Portions.Add(port);

port.Text = "List Test";

para.HasBullet = true;

para.BulletHeight = 50;

//Write the Presentation to the disk

pres.Write("D:\\Copy\\pptFont.ppt");

Hi Lars,

Please use the code snippet mentioned here to apply the bullet height on the portion text. I have used the bullet height of 150 to observe the difference. Please share with us, if you feel any issue.

Thanks and Regards,

Hi Mudassier,

unfortunatly the code does not work for me. If I clear the paragraphs and after that add one the bulletHeight Attribute does not apply.

The second problem is that the code only works without
// para.BulletType = BulletType.Symbol;
If I uncomment this line the list appears as numbered list.

I work with 4.4.6.0 for net2.0_x64.

I hope you can help.

Regards

Lars

Presentation pres = new Presentation();
Slide sld = pres.GetSlideByPosition(1);

//Add a font for a bullet character
FontEntity newFont = new FontEntity(pres, pres.Fonts[0]);
newFont.FontName = "Wingdings";
newFont.CharSet = FontCharSet.SYMBOL_CHARSET;
int newFontIdx = pres.Fonts.Add(newFont);

//Add a TextFrame
Aspose.Slides.Shape shp2 = sld.Shapes.AddRectangle(100, 100, 4000, 2000);
shp2.LineFormat.ShowLines = false;

//Set a text
TextFrame tf = shp2.AddTextFrame("");
tf.Paragraphs.Clear();

Paragraph para = new Paragraph();
tf.Paragraphs.Add(para);

Portion port = new Portion();
para.Portions.Add(port);

//Set font height
para.Portions[0].FontHeight = 45;
para.Portions[0].Text = "This is a paragraph.";

//Set the bullet

para.HasBullet = true;
// para.BulletType = BulletType.Symbol;
para.BulletCharacter = Convert.ToChar(118);
para.BulletFontIndex = newFontIdx;
para.BulletHeight = 50;

//Write presentation on disk
pres.Write("C:\\outBulletHeight.ppt");

Hi Lars,

I have investigated the issue shared by you related to setting bullet type to symbol. For the time being you may please omit setting the bullet type to symbol as by the type is symbol. However, an issue with ID 23827 has been created in our issue tracking system for resolution of setting bullet type issue. This thread has also been linked with the issue, so that you may be automatically notified, once the issue is resolved. Inorder to set the bullet height and bullet font, please add the following code lines when you are setting the bullet parameters. The following properties should be set to true to allow changing bullet size and font independently from master style.

//Set the bullet

para.IsBulletHardFont=true;

para.IsBulletHardSize = true;

Thanks and Regards,

Hi Mudassir,

perfect ... thanks a lot!

Best regards

Lars

Hi Lars,

I like to share that the issue of setting bullet type to SYMBOL has been resolved. Please download Aspose.Slides for .NET 5.0.3 from here, that contains the fix for the specified issue. Please share your feedback, if you still feel any issue.

Thanks and Regards,

The issues you have found earlier (filed as 23827) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.