Aspose::Words::ParagraphFormat::get_RightIndent method
Contents
[
Hide
]ParagraphFormat::get_RightIndent method
Gets or sets the value (in points) that represents the right indent for paragraph.
double Aspose::Words::ParagraphFormat::get_RightIndent()
Examples
Shows how to configure paragraph formatting to create off-center text.
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Center all text that the document builder writes, and set up indents.
// The indent configuration below will create a body of text that will sit asymmetrically on the page.
// The "center" that we align the text to will be the middle of the body of text, not the middle of the page.
SharedPtr<ParagraphFormat> paragraphFormat = builder->get_ParagraphFormat();
paragraphFormat->set_Alignment(ParagraphAlignment::Center);
paragraphFormat->set_LeftIndent(100);
paragraphFormat->set_RightIndent(50);
paragraphFormat->set_SpaceAfter(25);
builder->Writeln(u"This paragraph demonstrates how left and right indentation affects word wrapping.");
builder->Writeln(u"The space between the above paragraph and this one depends on the DocumentBuilder's paragraph format.");
doc->Save(ArtifactsDir + u"DocumentBuilder.SetParagraphFormatting.docx");
See Also
- Class ParagraphFormat
- Namespace Aspose::Words
- Library Aspose.Words for C++