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

Free Support Forum - aspose.com

Bullet points with text from database

Have a PPTX slite template with various pages. Some pages have shapes with bullet points. I read text fields from a db-field (entered by customers, e.g. do not know what text they enter) and want to show the different db-answers as individual bullet points. Problem: If I simply replace the template shape field with a string containing all db-texts then the line break in the text will add a bullet point. Which is the right way of adding bullet points to shapes / how do handle the line breaks int the individual db-field texts?

Hi Bo Ander,

I would recommend you to please use soft enter ("\v") for the user data instead of carriage return or line break. By doing so all the user data will get accommodated in one paragraph but in multiple lines. For your kind reference, the example code is shared.

//Instantiate a Presentation object that represents a PPT file
Presentation pres = new Presentation();

//Accessing a slide using its slide position 
Slide slide = pres.AddBodySlide();//.GetSlideByPosition(1);

//Accessing the first placeholder in the slide and typecasting it as a text holder
TextHolder th = (TextHolder)slide.Placeholders[1];

//Getting the first paragraph of the text holder
Paragraph para = th.Paragraphs[0];

//True means, it has bullets 
para.HasBullet = true;

//Setting the bullets color
para.BulletColor = Color.Blue;

//Setting the bullet height
para.BulletHeight = 125;

//Setting the bullet character using the ASCII code of a symbol
para.BulletCharacter = Convert.ToChar("?");
para.Text = "Hi Mudassir \v how are your there";

//Writing the presentation as a PPT file

Thanks and Regards,