Manage PowerPoint Text Paragraphs in .NET
Overview
Aspose.Slides for .NET represents text as a hierarchy of text frames, paragraphs, and portions:
- ITextFrame represents the text container in a shape and provides access to its paragraph collection.
- IParagraph represents one paragraph in a text frame and provides access to its portions and paragraph-level formatting.
- IPortion represents a text run within a paragraph. Each portion can have its own text and character-level formatting.
A paragraph can therefore contain text with different fonts, colors, sizes, and other formatting by using multiple portions.
Create and Format Paragraphs
Create Paragraphs with Multiple Portions
The following steps create a text frame with three paragraphs, each containing three portions:
- Create an instance of the Presentation class.
- Access the relevant slide’s reference through its index.
- Add a rectangular IAutoShape to the slide.
- Access the shape’s ITextFrame.
- Use the default paragraph and add two more IParagraph objects to the text frame.
- Add enough IPortion objects for each paragraph to contain three portions. The default paragraph already contains one empty portion.
- Set the text of each portion.
- Apply character-level formatting through IPortion.PortionFormat.
- Save the modified presentation.
This C# example implements the steps:
using System.Drawing;
using Aspose.Slides;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 150, 300, 150);
var textFrame = shape.TextFrame;
var firstParagraph = textFrame.Paragraphs[0];
firstParagraph.Portions.Add(new Portion());
firstParagraph.Portions.Add(new Portion());
var secondParagraph = new Paragraph();
secondParagraph.Portions.Add(new Portion());
secondParagraph.Portions.Add(new Portion());
secondParagraph.Portions.Add(new Portion());
textFrame.Paragraphs.Add(secondParagraph);
var thirdParagraph = new Paragraph();
thirdParagraph.Portions.Add(new Portion());
thirdParagraph.Portions.Add(new Portion());
thirdParagraph.Portions.Add(new Portion());
textFrame.Paragraphs.Add(thirdParagraph);
var paragraphCount = textFrame.Paragraphs.Count;
for (var paragraphIndex = 0; paragraphIndex < paragraphCount; paragraphIndex++)
{
var paragragaph = textFrame.Paragraphs[paragraphIndex];
var portionCount = paragragaph.Portions.Count;
for (var portionIndex = 0; portionIndex < portionCount; portionIndex++)
{
var portion = paragragaph.Portions[portionIndex];
portion.Text = $"Portion {paragraphIndex + 1}.{portionIndex + 1}";
if (portionIndex == 0)
{
portion.PortionFormat.FillFormat.FillType = FillType.Solid;
portion.PortionFormat.FillFormat.SolidFillColor.Color = Color.Red;
portion.PortionFormat.FontBold = NullableBool.True;
portion.PortionFormat.FontHeight = 15;
}
else if (portionIndex == 1)
{
portion.PortionFormat.FillFormat.FillType = FillType.Solid;
portion.PortionFormat.FillFormat.SolidFillColor.Color = Color.Blue;
portion.PortionFormat.FontItalic = NullableBool.True;
portion.PortionFormat.FontHeight = 18;
}
}
}
presentation.Save("paragraphs_with_portions.pptx", SaveFormat.Pptx);
Create Bulleted and Numbered Lists
Create a Bulleted or Numbered List
Bullets and numbering make related items easier to scan. In Aspose.Slides, list settings are defined through IBulletFormat.
- Create an instance of the Presentation class.
- Access the relevant slide’s reference through its index.
- Add an IAutoShape to the selected slide.
- Access the shape’s ITextFrame.
- Remove the default paragraph from the text frame.
- Create a Paragraph for a symbol bullet.
- Set IBulletFormat.Type to BulletType.Symbol and specify the bullet character.
- Set the paragraph text, indent, bullet color, and bullet height.
- Add the paragraph to the text frame.
- Create a second paragraph and set IBulletFormat.Type to BulletType.Numbered.
- Configure the numbered bullet style and add the paragraph to the text frame.
- Save the presentation.
This C# example creates a symbol bullet and a numbered bullet:
using System;
using System.Drawing;
using Aspose.Slides;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 200, 400, 200);
var textFrame = shape.TextFrame;
textFrame.Paragraphs.Clear();
var symbolParagraph = new Paragraph { Text = "Welcome to Aspose.Slides" };
symbolParagraph.ParagraphFormat.Bullet.Type = BulletType.Symbol;
symbolParagraph.ParagraphFormat.Bullet.Char = Convert.ToChar(0x2022);
symbolParagraph.ParagraphFormat.Indent = 25;
symbolParagraph.ParagraphFormat.Bullet.Color.ColorType = ColorType.RGB;
symbolParagraph.ParagraphFormat.Bullet.Color.Color = Color.Black;
symbolParagraph.ParagraphFormat.Bullet.IsBulletHardColor = NullableBool.True;
symbolParagraph.ParagraphFormat.Bullet.Height = 100;
textFrame.Paragraphs.Add(symbolParagraph);
var numberedParagraph = new Paragraph { Text = "This is a numbered item" };
numberedParagraph.ParagraphFormat.Bullet.Type = BulletType.Numbered;
numberedParagraph.ParagraphFormat.Bullet.NumberedBulletStyle = NumberedBulletStyle.BulletCircleNumWDBlackPlain;
numberedParagraph.ParagraphFormat.Indent = 25;
numberedParagraph.ParagraphFormat.Bullet.Color.ColorType = ColorType.RGB;
numberedParagraph.ParagraphFormat.Bullet.Color.Color = Color.Black;
numberedParagraph.ParagraphFormat.Bullet.IsBulletHardColor = NullableBool.True;
numberedParagraph.ParagraphFormat.Bullet.Height = 100;
textFrame.Paragraphs.Add(numberedParagraph);
presentation.Save("bulleted_and_numbered_list.pptx", SaveFormat.Pptx);
Use Picture Bullets
Picture bullets let you use a custom image instead of a symbol or number.
- Create an instance of the Presentation class.
- Access the relevant slide’s reference through its index.
- Add an IAutoShape and access its ITextFrame.
- Remove the default paragraph from the text frame.
- Load the bullet image and add it to the presentation’s image collection as an IPPImage.
- Create a Paragraph and set its text.
- Set IBulletFormat.Type to BulletType.Picture.
- Assign the image through IBulletFormat.Picture and set the bullet height.
- Add the paragraph to the text frame.
- Save the modified presentation.
This C# example creates a picture bullet:
using Aspose.Slides;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
using var bulletImage = Images.FromFile("bullets.png");
var presentationImage = presentation.Images.AddImage(bulletImage);
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 200, 400, 200);
var textFrame = shape.TextFrame;
textFrame.Paragraphs.Clear();
var paragraph = new Paragraph { Text = "Welcome to Aspose.Slides" };
paragraph.ParagraphFormat.Bullet.Type = BulletType.Picture;
paragraph.ParagraphFormat.Bullet.Picture.Image = presentationImage;
paragraph.ParagraphFormat.Bullet.Height = 100;
textFrame.Paragraphs.Add(paragraph);
presentation.Save("picture_bullet.pptx", SaveFormat.Pptx);
presentation.Save("picture_bullet.ppt", SaveFormat.Ppt);
Create a Multilevel List
Set IParagraphFormat.Depth to place paragraphs at different levels of a list. The top level has a depth of 0.
- Create a Presentation and access a slide.
- Add an IAutoShape and clear the default paragraph from its text frame.
- Create four paragraphs and configure their bullet symbols.
- Set their IParagraphFormat.Depth values to
0,1,2, and3. - Add the paragraphs to the text frame and save the presentation.
This C# example creates a four-level bulleted list:
using System;
using System.Drawing;
using Aspose.Slides;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 200, 400, 200);
var textFrame = shape.TextFrame;
textFrame.Paragraphs.Clear();
var firstParagraph = new Paragraph { Text = "Content" };
firstParagraph.ParagraphFormat.Bullet.Type = BulletType.Symbol;
firstParagraph.ParagraphFormat.Bullet.Char = Convert.ToChar(0x2022);
firstParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
firstParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
firstParagraph.ParagraphFormat.Depth = 0;
var secondParagraph = new Paragraph { Text = "Second level" };
secondParagraph.ParagraphFormat.Bullet.Type = BulletType.Symbol;
secondParagraph.ParagraphFormat.Bullet.Char = '-';
secondParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
secondParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
secondParagraph.ParagraphFormat.Depth = 1;
var thirdParagraph = new Paragraph { Text = "Third level" };
thirdParagraph.ParagraphFormat.Bullet.Type = BulletType.Symbol;
thirdParagraph.ParagraphFormat.Bullet.Char = Convert.ToChar(0x2022);
thirdParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
thirdParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
thirdParagraph.ParagraphFormat.Depth = 2;
var fourthParagraph = new Paragraph { Text = "Fourth level" };
fourthParagraph.ParagraphFormat.Bullet.Type = BulletType.Symbol;
fourthParagraph.ParagraphFormat.Bullet.Char = '-';
fourthParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
fourthParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
fourthParagraph.ParagraphFormat.Depth = 3;
textFrame.Paragraphs.Add(firstParagraph);
textFrame.Paragraphs.Add(secondParagraph);
textFrame.Paragraphs.Add(thirdParagraph);
textFrame.Paragraphs.Add(fourthParagraph);
presentation.Save("multilevel_list.pptx", SaveFormat.Pptx);
Start Numbered List Items at Custom Values
Use IBulletFormat.NumberedBulletStartWith to set the initial number displayed for a numbered paragraph.
- Create a Presentation and add an IAutoShape to a slide.
- Clear the default paragraph from the shape’s text frame.
- Create three numbered paragraphs.
- Set IBulletFormat.NumberedBulletStartWith to
2,3, and7for the respective paragraphs. - Add the paragraphs to the text frame and save the presentation.
This C# example assigns a custom starting number to each paragraph:
using Aspose.Slides;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 200, 200, 400, 200);
var textFrame = shape.TextFrame;
textFrame.Paragraphs.Clear();
var firstParagraph = new Paragraph { Text = "Start at 2" };
firstParagraph.ParagraphFormat.Bullet.Type = BulletType.Numbered;
firstParagraph.ParagraphFormat.Bullet.NumberedBulletStartWith = 2;
textFrame.Paragraphs.Add(firstParagraph);
var secondParagraph = new Paragraph { Text = "Start at 3" };
secondParagraph.ParagraphFormat.Bullet.Type = BulletType.Numbered;
secondParagraph.ParagraphFormat.Bullet.NumberedBulletStartWith = 3;
textFrame.Paragraphs.Add(secondParagraph);
var thirdParagraph = new Paragraph { Text = "Start at 7" };
thirdParagraph.ParagraphFormat.Bullet.Type = BulletType.Numbered;
thirdParagraph.ParagraphFormat.Bullet.NumberedBulletStartWith = 7;
textFrame.Paragraphs.Add(thirdParagraph);
presentation.Save("custom_numbered_list.pptx", SaveFormat.Pptx);
Control Paragraph Layout and End Properties
Set a First-Line Indent
Use the IParagraphFormat.Indent property to control the first-line indent of a paragraph. This property moves only the first line relative to the paragraph’s left margin. A positive value shifts the first line to the right, while the remaining lines stay aligned to the paragraph body.
Use IParagraphFormat.MarginLeft when you need to move the whole paragraph. Use IParagraphFormat.Indent when you need to move only the first line.
The example below creates several paragraphs and applies different IParagraphFormat.Indent values to demonstrate how the first-line indent affects paragraph layout.
- Create an instance of the Presentation class.
- Access the target slide.
- Add a rectangular IAutoShape to the slide.
- Access the shape’s ITextFrame and remove the default paragraph.
- Create several paragraphs and set different Indent values for them.
- Add the paragraphs to the text frame.
- Save the modified presentation.
This code shows you how to set a paragraph indent:
using System.Drawing;
using Aspose.Slides;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 420, 220);
shape.FillFormat.FillType = FillType.NoFill;
shape.LineFormat.FillFormat.FillType = FillType.Solid;
shape.LineFormat.FillFormat.SolidFillColor.Color = Color.Gray;
var textFrame = shape.TextFrame;
textFrame.TextFrameFormat.AutofitType = TextAutofitType.Shape;
textFrame.Paragraphs.Clear();
var firstParagraph = new Paragraph { Text = "No first-line indent. Wrapped lines start at the same position as the first line." };
firstParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
firstParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
firstParagraph.ParagraphFormat.MarginLeft = 20;
firstParagraph.ParagraphFormat.Indent = 0;
var secondParagraph = new Paragraph { Text = "First-line indent of 20 points. The first line moves to the right, while wrapped lines remain aligned to the paragraph body." };
secondParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
secondParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
secondParagraph.ParagraphFormat.MarginLeft = 20;
secondParagraph.ParagraphFormat.Indent = 20;
var thirdParagraph = new Paragraph { Text = "First-line indent of 40 points. This paragraph shows a larger first-line offset to make the effect easier to see." };
thirdParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
thirdParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
thirdParagraph.ParagraphFormat.MarginLeft = 20;
thirdParagraph.ParagraphFormat.Indent = 40;
textFrame.Paragraphs.Add(firstParagraph);
textFrame.Paragraphs.Add(secondParagraph);
textFrame.Paragraphs.Add(thirdParagraph);
presentation.Save("paragraph_indent.pptx", SaveFormat.Pptx);
The result:

Set a Hanging Indent
A hanging indent is a paragraph layout in which the first line starts to the left of the remaining lines. In Aspose.Slides, you create this effect with the IParagraphFormat.Indent property. Set Indent to a negative value to move the first line to the left relative to the paragraph body.
In practice, IParagraphFormat.MarginLeft defines the left position of the paragraph body, and IParagraphFormat.Indent defines the position of the first line relative to that margin. To create a hanging indent, set a positive MarginLeft value and a negative Indent value.
This formatting is useful for bibliographies, references, glossary entries, and other paragraphs where wrapped lines must align under the paragraph body rather than under the first character of the first line.
- Create an instance of the Presentation class.
- Access the target slide.
- Add a rectangular IAutoShape to the slide.
- Access the shape’s ITextFrame and remove the default paragraph.
- Create paragraphs and set a positive MarginLeft value for each paragraph.
- Set a negative Indent value to create the hanging indent effect.
- Add the paragraphs to the text frame.
- Save the modified presentation.
This code shows you how to set a hanging indent for a paragraph:
using System.Drawing;
using Aspose.Slides;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 420, 220);
shape.FillFormat.FillType = FillType.NoFill;
shape.LineFormat.FillFormat.FillType = FillType.Solid;
shape.LineFormat.FillFormat.SolidFillColor.Color = Color.Gray;
var textFrame = shape.TextFrame;
textFrame.TextFrameFormat.AutofitType = TextAutofitType.Shape;
textFrame.Paragraphs.Clear();
var firstParagraph = new Paragraph { Text = "A hanging indent is created by combining a positive left margin with a negative indent. The first line starts to the left, while wrapped lines align with the paragraph body." };
firstParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
firstParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
firstParagraph.ParagraphFormat.MarginLeft = 40;
firstParagraph.ParagraphFormat.Indent = -20;
var secondParagraph = new Paragraph { Text = "This second example uses a deeper hanging indent so the difference between the first line and the wrapped lines is easier to compare." };
secondParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.FillType = FillType.Solid;
secondParagraph.ParagraphFormat.DefaultPortionFormat.FillFormat.SolidFillColor.Color = Color.Black;
secondParagraph.ParagraphFormat.MarginLeft = 60;
secondParagraph.ParagraphFormat.Indent = -30;
textFrame.Paragraphs.Add(firstParagraph);
textFrame.Paragraphs.Add(secondParagraph);
presentation.Save("hanging_indent.pptx", SaveFormat.Pptx);
The result:

Set End Paragraph Run Properties
The IParagraph.EndParagraphPortionFormat property controls the formatting of the paragraph end mark. The following example assigns a font size and Latin font to the end mark of the second paragraph:
- Load a Presentation and access a slide.
- Add an IAutoShape and clear its default paragraph.
- Create two paragraphs and add text portions to them.
- Create a PortionFormat for the second paragraph’s end mark.
- Set IBasePortionFormat.FontHeight and IBasePortionFormat.LatinFont.
- Assign the format to IParagraph.EndParagraphPortionFormat and save the presentation.
using Aspose.Slides;
using Aspose.Slides.Export;
using var presentation = new Presentation("Test.pptx");
var slide = presentation.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 10, 200, 250);
var textFrame = shape.TextFrame;
textFrame.Paragraphs.Clear();
var firstParagraph = new Paragraph();
firstParagraph.Portions.Add(new Portion("Sample text"));
var secondParagraph = new Paragraph();
secondParagraph.Portions.Add(new Portion("Sample text 2"));
var endParagraphFormat = new PortionFormat();
endParagraphFormat.FontHeight = 48;
endParagraphFormat.LatinFont = new FontData("Times New Roman");
secondParagraph.EndParagraphPortionFormat = endParagraphFormat;
textFrame.Paragraphs.Add(firstParagraph);
textFrame.Paragraphs.Add(secondParagraph);
presentation.Save("end_paragraph_format.pptx", SaveFormat.Pptx);
Import and Export Paragraph Content
Import HTML Text into Paragraphs
Use ParagraphCollection.AddFromHtml to convert HTML markup into paragraphs and portions in a text frame.
- Create an instance of the Presentation class.
- Access a slide and add an IAutoShape.
- Access the shape’s ITextFrame and clear its default paragraph.
- Read the source HTML file.
- Pass the HTML string to ParagraphCollection.AddFromHtml.
- Save the modified presentation.
This C# example imports HTML into a text frame:
using System.IO;
using Aspose.Slides;
using Aspose.Slides.Export;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var shapeWidth = presentation.SlideSize.Size.Width - 20;
var shapeHeight = presentation.SlideSize.Size.Height - 20;
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 10, 10, shapeWidth, shapeHeight);
shape.FillFormat.FillType = FillType.NoFill;
shape.TextFrame.Paragraphs.Clear();
using var reader = new StreamReader("file.html");
var html = reader.ReadToEnd();
shape.TextFrame.Paragraphs.AddFromHtml(html);
presentation.Save("html_text.pptx", SaveFormat.Pptx);
Export Paragraph Text to HTML
Use ParagraphCollection.ExportToHtml to export a selected range of paragraphs as HTML.
- Create an instance of the Presentation class and load the desired presentation.
- Access the slide and find the IAutoShape that contains the text.
- Access the shape’s ITextFrame.
- Call ParagraphCollection.ExportToHtml with the starting paragraph index and the number of paragraphs to export.
- Write the returned HTML string to a file.
This C# example exports all paragraphs from the first text shape:
using System;
using System.IO;
using System.Text;
using Aspose.Slides;
using var presentation = new Presentation("ExportingHTMLText.pptx");
var shape = presentation.Slides[0].Shapes[0];
if (shape is IAutoShape textShape && textShape.TextFrame != null)
{
var paragraphs = textShape.TextFrame.Paragraphs;
var html = paragraphs.ExportToHtml(0, paragraphs.Count, null);
using var writer = new StreamWriter("paragraphs.html", false, Encoding.UTF8);
writer.Write(html);
}
else
{
Console.WriteLine("The first shape is not a text shape.");
}
Render a Paragraph as an Image
IParagraph.GetImage renders an individual paragraph directly and returns an IImage. Save the result to a file or stream with IImage.Save. You do not need to render the containing shape or crop a bitmap manually.
IParagraph.GetImage can return null if the paragraph cannot be found in its parent collection, has no valid rendering bounds, or cannot be rendered. Check the result before saving it and dispose of the returned image after use.
Render a Paragraph at the Default Scale
Let’s assume we have a presentation file called sample.pptx with one slide, where the first shape is a text box containing three paragraphs.

The following example renders the second paragraph in a regular text shape at the default scale and saves the returned image in PNG format. The using declaration ensures that the image is disposed of correctly.
using System;
using Aspose.Slides;
using var presentation = new Presentation("sample.pptx");
var shape = presentation.Slides[0].Shapes[0];
if (shape is IAutoShape textShape &&
textShape.TextFrame != null &&
textShape.TextFrame.Paragraphs.Count > 1)
{
var paragraph = textShape.TextFrame.Paragraphs[1];
using var paragraphImage = paragraph.GetImage();
if (paragraphImage != null)
{
paragraphImage.Save("paragraph.png", ImageFormat.Png);
}
else
{
Console.WriteLine("The paragraph could not be rendered.");
}
}
else
{
Console.WriteLine("The expected text shape or paragraph was not found.");
}
The result:

Render a Paragraph in a Table Cell with Scaling
Use the IParagraph.GetImage overload that accepts float scaleX and float scaleY parameters to set the horizontal and vertical scale factors. The following example creates a table, renders the paragraph in its first cell at twice its default width and height, and saves the result as a PNG image.
using System;
using Aspose.Slides;
var scaleX = 2f;
var scaleY = 2f;
using var presentation = new Presentation();
var slide = presentation.Slides[0];
var table = slide.Shapes.AddTable(50, 50, new[] { 300d }, new[] { 80d });
var paragraph = table[0, 0].TextFrame.Paragraphs[0];
paragraph.Text = "Text in a table cell";
using var paragraphImage = paragraph.GetImage(scaleX, scaleY);
if (paragraphImage != null)
{
paragraphImage.Save("table_paragraph.png", ImageFormat.Png);
}
else
{
Console.WriteLine("The paragraph could not be rendered.");
}
A scale factor of 1 keeps that axis at its default pixel size. For example, 2 for both factors produces an image whose width and height are approximately twice the default dimensions, resulting in four times as many pixels. Larger factors generally produce sharper text for zooming or high-resolution output, but they also increase memory use and file size. Factors below 1 produce smaller images with less detail. Use equal factors to preserve the paragraph’s aspect ratio; different horizontal and vertical factors stretch the output independently.
Rendering a whole shape with IShape.GetImage remains useful when the output must include the shape’s fill, border, or other visual context. For a paragraph-only image, use IParagraph.GetImage.
FAQ
Can I completely disable line wrapping inside a text frame?
Yes. Set ITextFrameFormat.WrapText to disable wrapping so lines do not break at the text frame’s edges.
How can I get the exact on-slide bounds of a specific paragraph?
Use IParagraph.GetRect to retrieve the paragraph’s bounding rectangle. IPortion.GetRect provides the bounds of an individual portion.
Where is paragraph alignment (left, right, center, or justify) controlled?
IParagraphFormat.Alignment is a paragraph-level setting and applies to the whole paragraph regardless of individual portion formatting.
Can I set the proofing language for part of a paragraph?
Yes. Set IBasePortionFormat.LanguageId for individual portions, so one paragraph can contain text in multiple languages.