Paper Office
paper-pptxAPI referenceinspect

pptx.inspect

paper-pptx 0.2.0 API reference

Effective-style inspection: resolved font values with provenance (paper-pptx).

Upstream python-pptx reports None for any character property that is inherited, leaving callers blind to what a deck actually renders. This module implements the documented inheritance walk for font size, font name, and font color and reports, for every resolved value, the ordered chain of sources consulted (read-only inspection is provenance-bearing).

The pinned walk, per run (levels consulted in order until one supplies the value):

  1. the run's own a:rPr
  2. the containing paragraph's a:pPr/a:defRPr
  3. the shape's own p:txBody/a:lstStyle at the paragraph's indent level
  4. placeholder shapes: the layout placeholder's lstStyle (matched by idx, falling back to type), then the master placeholder's lstStyle (title-family → master title placeholder, otherwise master body placeholder), then the master's p:txStyles family style (title/ctrTitle → titleStyle; body/subTitle/obj and vertical variants → bodyStyle; anything else → otherStyle)
  5. non-placeholder shapes: the shape's p:style/a:fontRef, then the presentation's p:defaultTextStyle

Font-name theme references (+mj-lt/+mn-lt) resolve through the master's theme part (a:fontScheme). Scheme colors resolve through the slide's p:clrMapOvr override when present, else the master's p:clrMap, then the theme's a:clrScheme (a:sysClr uses its lastClr). Anything genuinely outside this walk reports resolved=False with the consulted chain — never a guessed default.

Everything here is strictly read-only: no method mutates any element, and raw-XML reads are used throughout (several upstream proxy accessors are get-or-add and would dirty the tree).

BULLET_FOLLOWS_TEXT

attributeBULLET_FOLLOWS_TEXT
= 'follow text'

DECK_MANIFEST_SCHEMA

attributeDECK_MANIFEST_SCHEMA
= 'paper-deck-manifest'

DECK_MANIFEST_VERSION

attributeDECK_MANIFEST_VERSION
= 1

SCHEMA_NAME

attributeSCHEMA_NAME
= 'paper-text-inspection'

SCHEMA_VERSION

attributeSCHEMA_VERSION
= 3

On this page