Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Tue Jun 11, 2024 6:09 am

Hi,
I have the following issue: I am trying to create a bullet list and at some point I want to control on adding a new line.
Bullets are added at paragraph level so I am trying to concatenate a new line into that paragraph.

Code: Select all
           
tp.TextRanges.Append(new TextRange(Environment.NewLine));
TextBulletType bulletType;
           
            tp.BulletType = bulletType;

            tp.CustomBulletColor = true;
            tp.BulletColor.Color = Util.GetColor(bulletColor);

            tp.BulletSize = 100f;
            tp.Depth = bulletIndentLevel;



On a windows machine the result looks good, however if you run this in a docker container with linux OS the result shows an additional bullet added for each new line (see attachments). New line is already based on environment as far as i know so it should be adding \r\n for windows and \n for linux. (I tried to add those by myself just to make sure.)

Is there any way to simulate a ctrl+enter? Adding a new line with no bullet? (I would avoid adding an additional paragraph if possible).

andreacalvi
 
Posts: 23
Joined: Tue Jul 11, 2023 11:02 am

Tue Jun 11, 2024 9:53 am

Hello,

Thanks for your inquiry.
For your case, we recommend you add an empty paragraph to achieve the effect of adding a new line instead of using "\r\n". If you have any other questions, please feel free to write back.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.Presentation