Paper Office
paper-pptxAPI referencerebind

pptx.rebind

paper-pptx 0.2.0 API reference

Layout rebind - the template-migration primitive (paper-pptx addition).

Moving a slide between layouts without corrupting placeholder inheritance is the package-level piece of template migration; deciding what maps where is the caller's job (the workflow stays in the harness). slide.rebind_layout(...) reconciles the slide's placeholders against the target layout (auto-matching by type then type-family, explicit map overrides), retargets the slide->layout relationship, and returns the REQUIRED RebindReport: the effective-value resolver runs before and after, and every text run whose resolved values changed appears in the report - appearance shifts are reported, never silent.

Orphans - source placeholders with no destination match - follow orphan_policy: "refuse" (default; typed, atomic) or "bake": the placeholder becomes a free shape with its effective formatting written explicitly (geometry materialized from inheritance, each run's resolved size/name/color/emphasis made local) so the text keeps its look without a binding. Bake writes only values the resolver can localize exactly. Color-transform recipes are preserved; unsupported script-specific formatting refuses before mutation.

SCHEMA_NAME

attributeSCHEMA_NAME
= 'paper-rebind-report'

SCHEMA_VERSION

attributeSCHEMA_VERSION
= 1

On this page