Read Paragraph Properties
Introduction
This article shows you how you can read options of a paragraph by index from a PowerPoint presentation using Aspose.Slides for Cloud API. Paragraph options are commonly used to change the appearance of text. These options include alignments, indents, spacing, etc. Some options allow you to create bulleted and numbered lists from paragraphs. You can use our REST API with any language: .NET, Java, PHP, Ruby, Python, С++, and much more.
API Information
API | Type | Description | Resource |
---|---|---|---|
/slides/{name}/slides/{slideIndex}/shapes/{shapeIndex}/paragraphs/{paragraphIndex} | GET | Reads properties of a paragraph in a shape. | GetParagraph |
Request Parameters
Name | Type | Location | Required | Description |
---|---|---|---|---|
name | string | path | true | The presentation file name. |
slideIndex | integer | path | true | The 1-based index of the presentation slide. |
shapeIndex | integer | path | true | The 1-based index of the shape. |
paragraphIndex | integer | path | true | The 1-based index of the paragraph. |
password | string | header | false | The password to open the presentation. |
folder | string | query | false | The folder where the presentation file is located. |
storage | string | query | false | The storage where the presentation file is located. |
subShape | string | query | false | Sub-shape path (e.g. “3”, “3/shapes/2) |
In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.
cURL Example
Read properties of a paragraph at index 3 from a shape at index 2 on a slide at index 1 in example.pptx. The storage is ‘Main’. The folder is ‘Data’.
SDK Source
The Aspose for Cloud SDKs can be downloaded from the following page: Available SDKs.
SDK Examples
Read properties of a paragraph at index 1 from a shape at index 2 on a slide at index 1 in example.pptx. The storage is ‘Main’. The folder is ‘Data’.
Paragraph properties
The following table describes the parameters that you can use to get and update the properties of a paragraph.
Portion
class.
Parameter | Type | Description |
---|---|---|
Alignment | AlignmentEnum | One of the AlignmentEnum values that determines a horizontal placement of the text. |
AlternateLinks | List<ResourceUri> | The collection of alternate links related to this resource. Inherited from ResourceBase . |
BulletChar | string | The symbol for a bulleted list. |
BulletHeight | double | The height of a bullet symbol. |
BulletType | BulletTypeEnum | One of the BulletTypeEnum values that determines a bullet type. |
DefaultTabSize | double | The size of default tab stops. |
Depth | int | The indent level. |
EastAsianLineBreak | EastAsianLineBreakEnum | One of the EastAsianLineBreakEnum values that determines line breaks for East Asian text. |
FontAlignment | FontAlignmentEnum | One of the FontAlignmentEnum values that determines vertical text alignment for Asian typography. |
HangingPunctuation | HangingPunctuationEnum | One of the HangingPunctuationEnum values that determines hanging punctuation for the text. |
Indent | double | The indent for the first line of the text (hanging indent). The parameter can be set to negative values. |
LatinLineBreak | LatinLineBreakEnum | One of the LatinLineBreakEnum values that determines text wrapping in the middle of a word. |
MarginLeft | double | The indentation before the text. |
MarginRight | double | The indentation after the text. |
NumberedBulletStartWith | int | The first number for a numbered list. |
NumberedBulletStyle | NumberedBulletStyleEnum | One of the NumberedBulletStyleEnum values that determines a bullet style of a numbered list. |
PortionList | List<Portion> | The collection of text portions. |
RightToLeft | RightToLeftEnum | One of the RightToLeftEnum values that determines right-to-left direction for the text. |
SelfUri | ResourceUri | The main part of an URL used to get the object. Inherited from ResourceBase . |
SpaceAfter | double | The text spacing after the last line of the paragraph. A positive value specifies the percentage of the font size. A negative value specifies the size in points. |
SpaceBefore | double | The text spacing before the first line of the paragraph. A positive value specifies the percentage of the font size. A negative value specifies the size in points. |
SpaceWithin | double | The text spacing between base lines of the paragraph. A positive value specifies the percentage of the font size. A negative value specifies the size in points. |
AlignmentEnum
Specifies the horizontal placement of a text.
Members
Name | Value | Description |
---|---|---|
Center | 1 | Aligns a paragraph horizontally to the center. |
Distributed | 5 | Distributes a paragraph text evenly between the left and right margins, adding spaces between characters and words. |
Justify | 3 | Distributes a paragraph text evenly between the left and right margins. |
JustifyLow | 4 | Lengthens kashidas in Arabic text slightly. |
Left | 0 | Aligns a paragraph horizontally to the left. |
NotDefined | 6 | The horizontal alignment is not defined. |
Right | 2 | Aligns a paragraph horizontally to the right. |
BulletTypeEnum
Specifies a bullet type for a list item.
Members
Name | Value | Description |
---|---|---|
None | 0 | Specifies the default effective value. |
NotDefined | 4 | The bullet type is not defined. |
Numbered | 2 | Specifies a number for a bullet. |
Picture | 3 | Specifies a picture for a bullet. |
Symbol | 1 | Specifies a character for a bullet. |
EastAsianLineBreakEnum
Specifies line breaks for East Asian text.
Members
Name | Value | Description |
---|---|---|
False | 0 | Do not apply line breaks. |
NotDefined | 2 | The line breaks are not defined. |
True | 1 | Apply line breaks. |
FontAlignmentEnum
Specifies vertical text alignment for Asian typography.
Members
Name | Value | Description |
---|---|---|
Automatic | 0 | Specifies automatic alignment for a font. |
Baseline | 4 | Specifies alignment to the baseline of a font. |
Bottom | 3 | Specifies alignment to the bottom of a font. |
Center | 2 | Specifies alignment to the center of a font. |
Default | 5 | Specifies a default alignment. |
Top | 1 | Specifies alignment to the top of a font. |
HangingPunctuationEnum
Specifies hanging punctuation for a text.
Members
Name | Value | Description |
---|---|---|
False | 0 | Do not apply hanging punctuation. |
NotDefined | 2 | The hanging punctuation is not defined. |
True | 1 | Apply hanging punctuation. |
LatinLineBreakEnum
Specifies text wrapping in the middle of a word.
Members
Name | Value | Description |
---|---|---|
False | 0 | Do not apply text wrapping. |
NotDefined | 2 | The text wrapping is not defined. |
True | 1 | Apply text wrapping. |
NumberedBulletStyleEnum
Specifies a bullet style of a numbered list.
Members
Name | Value | Description |
---|---|---|
BulletAlphaLCParenBoth | 8 | Specifies lowercase alphabetical letters with both parentheses. Sample: (a), (b), (c), … |
BulletAlphaLCParenRight | 9 | Specifies lowercase alphabetical letters with a closing parenthesis. Sample: a), b), c), … |
BulletAlphaLCPeriod | 0 | Specifies lowercase alphabetical letters with a period. Sample: a., b., c., … |
BulletAlphaUCParenBoth | 10 | Specifies uppercase alphabetical letters with both parentheses. Sample: (A), (B), (C), … |
BulletAlphaUCParenRight | 11 | Specifies uppercase alphabetical letters with a closing parenthesis. Sample: A), B), C), … |
BulletAlphaUCPeriod | 1 | Specifies uppercase alphabetical letters with a period. Sample: A., B., C., … |
BulletArabicAbjadDash | 24 | Specifies Arabic abjad alphabetical letters with a dash. |
BulletArabicAlphaDash | 23 | Specifies Arabic alphabetical letters with a dash. |
BulletArabicDBPeriod | 29 | Specifies double-byte Arabic numbering scheme with a double-byte period. |
BulletArabicDBPlain | 28 | Specifies double-byte Arabic numbering scheme (no punctuation). |
BulletArabicParenBoth | 12 | Specifies Arabic numbers with both parentheses. Sample: (1), (2), (3), … |
BulletArabicParenRight | 2 | Specifies Arabic numbers with a closing parenthesis. Sample: 1), 2), 3), … |
BulletArabicPeriod | 3 | Specifies Arabic numbers with a period. Sample: 1., 2., 3., … |
BulletArabicPlain | 13 | Specifies Arabic numbers. Sample: 1, 2, 3, … |
BulletCircleNumDBPlain | 18 | Specifies double-byte circled number for values up to 10. From 11 - Arabic numbers. |
BulletCircleNumWDBlackPlain | 20 | Specifies numbers on a disk (Wingdings black circled numbers). |
BulletCircleNumWDWhitePlain | 19 | Specifies circled numbers (Wingdings white circled numbers). From 11 - Arabic numbers. |
BulletHebrewAlphaDash | 25 | Specifies Hebrew alphabetical letters with a dash. |
BulletHindiAlpha1Period | 40 | Specifies consonant letters from Hindi alphabet with a period. |
BulletHindiAlphaPeriod | 36 | Specifies vowel letters from Hindi alphabet with a period. |
BulletHindiNumParenRight | 39 | Specifies Hindi numbers with a closing parenthesis. |
BulletHindiNumPeriod | 37 | Specifies Hindi numbers with a period. |
BulletKanjiKoreanPeriod | 27 | Specifies Japanese/Korean numbers with a period. |
BulletKanjiKoreanPlain | 26 | Specifies Japanese/Korean numbers. |
BulletKanjiSimpChinDBPeriod | 38 | Specifies Kanji Simple Chinese characters with a period. |
BulletRomanLCParenBoth | 4 | Specifies lowercase Roman numbers with both parentheses. Sample: (i), (ii), (iii), … |
BulletRomanLCParenRight | 5 | Specifies lowercase Roman numbers with a closing parenthesis. Sample: i), ii), iii), … |
BulletRomanLCPeriod | 6 | Specifies lowercase Roman numbers with a period. Sample: i., ii., iii., … |
BulletRomanUCParenBoth | 14 | Specifies uppercase Roman numbers with both parentheses. Sample: (I), (II), (III), … |
BulletRomanUCParenRight | 15 | Specifies uppercase Roman numbers with a closing parenthesis. Sample: I), II), III), … |
BulletRomanUCPeriod | 7 | Specifies uppercase Roman numbers with a period. Sample: I., II., III., … |
BulletSimpChinPeriod | 17 | Specifies simplified Chinese characters with a period. |
BulletSimpChinPlain | 16 | Specifies simplified Chinese characters. |
BulletThaiAlphaParenBoth | 32 | Specifies Thai alphabetical letters with both parentheses. |
BulletThaiAlphaParenRight | 31 | Specifies Thai alphabetical letters with a closing parenthesis. |
BulletThaiAlphaPeriod | 30 | Specifies Thai alphabetical letters with a period. |
BulletThaiNumParenBoth | 35 | Specifies Thai numbers with both parentheses. |
BulletThaiNumParenRight | 34 | Specifies Thai numbers with a closing parenthesis. |
BulletThaiNumPeriod | 33 | Specifies Thai numbers with a period. |
BulletTradChinPeriod | 22 | Specifies traditional Chinese characters with a period. |
BulletTradChinPlain | 21 | Specifies traditional Chinese characters. |
NotDefined | 41 | The bullet style is not defined. |
RightToLeftEnum
Specifies right-to-left direction for a text.
Members
Name | Value | Description |
---|---|---|
False | 0 | Do not apply right-to-left direction. |
NotDefined | 2 | Right-to-left direction is not defined. |
True | 1 | Apply right-to-left direction. |
null
. This means that the parameter has a default value or the value is not defined (inherited from a parent object).