paper-pptxAPI referenceinspect
TextBlock
paper-pptx 0.2.0 API reference
One paragraph of one text body, with anchor and per-run effective fonts.
container says where the text lives: "shape" (a top-level p:sp), "group" (a p:sp
inside p:grpSp nesting; container_detail is the slash-joined group-name path), or
"table-cell" (container_detail is "<frame-name>!r{row}c{col}"). blind is True when
the block's text is visible but its effective values are unresolvable by design in
this version (table-cell runs inherit through table styles, a chain not yet walked);
a blind block's runs carry resolved=False values, never guesses.
TextBlock(anchor: BlockAnchor, shape_id: int, shape_name: str, placeholder_type: Optional[str], level: int, text: str, runs: Tuple[InspectedRun, ...], container: str = 'shape', container_detail: Optional[str] = None, blind: bool = False, fields: Tuple[str, ...] = ())Attributes
anchor
attributeanchorBlockAnchorblind
attributeblindbool= Falsecontainer
attributecontainerstr= 'shape'container_detail
attributecontainer_detailOptional[str]= Nonefields
attributefieldsTuple[str, ...]= ()level
attributelevelintplaceholder_type
attributeplaceholder_typeOptional[str]runs
attributerunsTuple[InspectedRun, ...]shape_id
attributeshape_idintshape_name
attributeshape_namestrtext
attributetextstrFunctions
to_dict
functo_dict() -> dictReturn this block as a JSON-ready dict, anchor included, for reports and diffs.
Returns
dict