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 | NoneThe bullet character (a:buChar/@char), None unless a character bullet is set.
font_name
attributefont_namestr | NoneBullet-specific typeface (a:buFont/@typeface), or None when not set locally.
number_scheme
attributenumber_schemestr | NoneNumbering scheme token (a:buAutoNum/@type), e.g. "arabicPeriod", or None.
size_percent
attributesize_percentfloat | NoneBullet size as a fraction of the text size (a:buSzPct), e.g. 0.75, or None.
start_at
attributestart_atint | NoneFirst number of an auto-numbered sequence, None unless numbering is set.
type
attributetypePP_BULLET_TYPE | NoneKind 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) -> NoneGive 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= Noneparamsize_percentfloat | None= Noneparamleft_marginLength | None= DEFAULT_BULLET_LEFT_MARGINparamhanging_indentLength | None= DEFAULT_BULLET_HANGING_INDENTReturns
Noneset_none
funcset_none() -> NoneSet an explicit "no bullet" (a:buNone), overriding any inherited bullet.
Margins, bullet font, and bullet size attributes are left untouched.
Returns
Noneset_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) -> NoneGive 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= 1paramfont_namestr | None= Noneparamsize_percentfloat | None= Noneparamleft_marginLength | None= DEFAULT_BULLET_LEFT_MARGINparamhanging_indentLength | None= DEFAULT_BULLET_HANGING_INDENTReturns
None