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,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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.<o:p></o:p>

a Presentation object that represents a PPT file<o:p></o:p>

pres = new Presentation();<o:p></o:p>

a slide using its slide position<o:p></o:p>

slide = pres.AddBodySlide ();//.GetSlideByPosition(1);<o:p></o:p>

the first placeholder in the slide and typecasting it as a text holder<o:p></o:p>

th = (TextHolder)slide.Placeholders[1];<o:p></o:p>

the first paragraph of the text holder<o:p></o:p>

para = th.Paragraphs[0];<o:p></o:p>

means, it has bullets<o:p></o:p>

para.HasBullet = true;<o:p></o:p>

the bullets color<o:p></o:p>

para.BulletColor = Color.Blue;<o:p></o:p>

the bullet height<o:p></o:p>

para.BulletHeight = 125;<o:p></o:p>

the bullet character using the ASCII code of a symbol<o:p></o:p>

para.BulletCharacter = Convert.ToChar("?");<o:p></o:p>

para.Text = “Hi Mudassir \v how are your there”;<o:p></o:p>

the presentation as a PPT file<o:p></o:p>


Thanks and Regards,