Paper Office
paper-pptxAPI referencetext.bullet

BulletFormat

paper-pptx 0.2.0 API reference

Bullet and numbering state of a single paragraph.

Read properties report this paragraph's local a:pPr state only: None means "nothing set here", in which case rendering inherits from the placeholder/list-style chain (use the effective-style inspection API to see what actually renders).

BulletFormat(p: CT_TextParagraph, part=None)

Attributes

char

attributecharstr | None

The bullet character (a:buChar/@char), None unless a character bullet is set.

font_name

attributefont_namestr | None

Bullet-specific typeface (a:buFont/@typeface), or None when not set locally.

number_scheme

attributenumber_schemestr | None

Numbering scheme token (a:buAutoNum/@type), e.g. "arabicPeriod", or None.

size_percent

attributesize_percentfloat | None

Bullet size as a fraction of the text size (a:buSzPct), e.g. 0.75, or None.

start_at

attributestart_atint | None

First number of an auto-numbered sequence, None unless numbering is set.

type

attributetypePP_BULLET_TYPE | None

Kind of bullet explicitly set on this paragraph, None when nothing local is set.

Functions

set_character

funcset_character(char: str = '•', *, font_name: str | None = None, size_percent: float | None = None, left_margin: Length | None = DEFAULT_BULLET_LEFT_MARGIN, hanging_indent: Length | None = DEFAULT_BULLET_HANGING_INDENT) -> None

Give this paragraph a real character bullet (a:buChar).

left_margin/hanging_indent write marL/indent so the bullet hangs correctly; pass None for either to leave the existing paragraph attribute untouched. font_name sets a bullet-specific typeface (a:buFont); size_percent scales the bullet relative to the text size (fraction, 0.25–4.0).

paramcharstr
= '•'
paramfont_namestr | None
= None
paramsize_percentfloat | None
= None
paramleft_marginLength | None
= DEFAULT_BULLET_LEFT_MARGIN
paramhanging_indentLength | None
= DEFAULT_BULLET_HANGING_INDENT

Returns

None

set_none

funcset_none() -> None

Set an explicit "no bullet" (a:buNone), overriding any inherited bullet.

Margins, bullet font, and bullet size attributes are left untouched.

Returns

None

set_numbered

funcset_numbered(scheme: str = 'arabicPeriod', *, start_at: int = 1, font_name: str | None = None, size_percent: float | None = None, left_margin: Length | None = DEFAULT_BULLET_LEFT_MARGIN, hanging_indent: Length | None = DEFAULT_BULLET_HANGING_INDENT) -> None

Give this paragraph PowerPoint automatic numbering (a:buAutoNum).

scheme is an ECMA-376 auto-number token like "arabicPeriod" or "romanUcParenR"; an unknown token raises ValueError. Numbering restarts at start_at.

paramschemestr
= 'arabicPeriod'
paramstart_atint
= 1
paramfont_namestr | None
= None
paramsize_percentfloat | None
= None
paramleft_marginLength | None
= DEFAULT_BULLET_LEFT_MARGIN
paramhanging_indentLength | None
= DEFAULT_BULLET_HANGING_INDENT

Returns

None

On this page