Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

feat(svg-to-pptx): expose baseline structure mode

hugohe3a9fe5c93730a
diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.md
index f97e8f84..ab58967e 100644
--- a/skills/ppt-master/SKILL.md
+++ b/skills/ppt-master/SKILL.md
@@ -668,6 +668,13 @@ python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path>
> SVG visual reference, so it's only needed when you want a self-contained file
> to share. Pass `-s output` or `-s final` to force a single source if you need it.
+> **PPTX structure mode** — native export defaults to
+> `--pptx-structure baseline`: the package keeps the real slide master/layout
+> relationship from the base deck and promotes identical native slide
+> backgrounds into the slide master, so ordinary decks do not repeat safe shared
+> background fills on every slide. Add `--pptx-structure flat` only for
+> debugging/comparison when every background must remain slide-local.
+
> **Paragraph editability vs line fidelity** — by default, mergeable dy-stacked
> paragraph blocks collapse into one editable PowerPoint text frame with multiple
> `<a:p>`, improving body-text editing and resize/reflow behavior. Add `--no-merge`
diff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.md
index 8fca4444..9eb32389 100644
--- a/skills/ppt-master/scripts/README.md
+++ b/skills/ppt-master/scripts/README.md
@@ -115,6 +115,8 @@ python3 scripts/svg_to_pptx.py <project_path>
`finalize_svg.py` optimizes raster images by default using `2x` display pixels and max `2560px`. Native `svg_to_pptx.py` defaults to `--image-sizing cap`: only oversized full source images are reduced to max `2560px`, so later PowerPoint resizing keeps more image detail. Use `svg_to_pptx.py --image-sizing display --image-scale 2` only for aggressive size reduction, or `--no-image-optimize` when the native PPTX must embed original image bytes.
+Native `svg_to_pptx.py` also defaults to `--pptx-structure baseline`: the generated deck keeps a standard master/layout relationship and promotes identical native slide backgrounds into the slide master. Use `--pptx-structure flat` only when debugging or comparing fully slide-local output.
+
Image generation:
```bash
diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/builder.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/builder.py
index 0adf80f2..58753afc 100644
--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/builder.py
+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/builder.py
@@ -826,6 +826,7 @@ def create_pptx_with_native_svg(
image_scale: float = 2.0,
image_quality: int = 85,
native_objects: bool = False,
+ pptx_structure: str = "baseline",
conversion_trace_path: Path | None = None,
doc_metadata: dict[str, Any] | None = None,
) -> bool:
@@ -863,6 +864,9 @@ def create_pptx_with_native_svg(
image_quality: JPEG quality used for opaque optimized rasters.
native_objects: Convert explicit ``data-pptx-native`` table/chart
markers to native PowerPoint objects. Default off.
+ pptx_structure: PPTX structure strategy. ``baseline`` promotes safe
+ shared native backgrounds to slide masters; ``flat`` leaves all
+ slide backgrounds slide-local for debugging/comparison.
conversion_trace_path: Optional JSON path for native conversion diagnostics.
Returns:
@@ -875,6 +879,8 @@ def create_pptx_with_native_svg(
# Native shapes mode takes priority over compat mode
if use_native_shapes:
use_compat_mode = False
+ if pptx_structure not in {"baseline", "flat"}:
+ raise ValueError(f"Unsupported pptx_structure: {pptx_structure}")
# Check compatibility mode dependencies
renderer_name, renderer_status, renderer_hint = get_png_renderer_info()
@@ -914,6 +920,7 @@ def create_pptx_with_native_svg(
" Native table/chart objects: "
f"{'Enabled' if native_objects else 'Disabled'}"
)
+ print(f" PPTX structure: {pptx_structure}")
if image_optimize:
if image_sizing == 'display':
image_mode = (
@@ -1336,7 +1343,11 @@ def create_pptx_with_native_svg(
if use_native_shapes:
raise
- if use_native_shapes and success_count == len(svg_files):
+ if (
+ use_native_shapes
+ and pptx_structure == "baseline"
+ and success_count == len(svg_files)
+ ):
_promote_common_slide_backgrounds_to_masters(
extract_dir,
structure,
diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py
index 2d08022e..3c72a56c 100644
--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py
+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py
@@ -193,6 +193,11 @@ Recorded narration:
'groups export through their SVG fallback children. When set, '
'the default-flow export is named <project>_<ts>_native_charts.pptx '
'to tell it apart from a plain shape export.')
+ parser.add_argument('--pptx-structure', choices=['baseline', 'flat'], default='baseline',
+ help='PPTX structure strategy for native export. baseline (default) '
+ 'keeps a standard master/layout package and promotes identical '
+ 'native slide backgrounds to the slide master; flat leaves '
+ 'those backgrounds slide-local for debugging/comparison.')
parser.add_argument('--svg-snapshot', action='store_true', default=False,
help='Also emit the SVG-rendered snapshot pptx alongside '
'the native pptx in exports/ (named '
@@ -618,6 +623,7 @@ Recorded narration:
image_scale=args.image_scale,
image_quality=args.image_quality,
native_objects=args.native_objects,
+ pptx_structure=args.pptx_structure,
)
success = True