Skip to content

Commit 3a67ad6

Browse files
authored
docs(pptx): say what a partial capability actually costs (#445)
The module README carried the same overstatement the release notes did: it described all ten partial capabilities as rendering "natively with an approximated styling detail". Reading the matrix rows rather than the count shows only some are that. The others lose content the format cannot carry — bookmarks after the first on a slide are dropped, parts of an inline SVG fall back to a transparent PNG, and the metadata producer value has no OPC field. The opening sentence also lumped "links and navigation" together as native. Links are: hyperlinks and internal slide jumps render as real PowerPoint links. Bookmarks are the degraded half, so a reader with a bookmark-heavy document was told the wrong thing about the one part that loses data. Split the summary so the partial group is not characterised as one thing, list the three content-losing cases under limitations, and record the clip raster's resolution behaviour — it targets a 2048-pixel long edge clamped between native size and 4x, which the matrix has carried since the clamp landed but this page did not.
1 parent 84f3748 commit 3a67ad6

1 file changed

Lines changed: 25 additions & 9 deletions

File tree

render-pptx/README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ compiled in core before either of them runs.
1111
## Status
1212

1313
**Experimental (`@Beta`), first shipped in 2.1.0.** The backend is complete
14-
enough for production decks: text, tables, shapes, images, gradients, links and
15-
navigation, headers/footers/watermarks, and multi-section documents all arrive as
16-
native PowerPoint objects rather than pictures. Across the 38 capabilities the
17-
matrix tracks, 24 map to a native equivalent, 10 render natively with an
18-
approximated styling detail (distinct per-corner radii collapse to one value,
19-
numeric dash arrays map to the nearest preset, some inline SVG layers fall back
20-
to a transparent PNG), and 4 are not supported at all — see the limitations below.
14+
enough for production decks: text, tables, shapes, images, gradients, hyperlinks
15+
and slide jumps, headers/footers/watermarks, and multi-section documents all
16+
arrive as native PowerPoint objects rather than pictures.
17+
18+
Across the 38 capabilities the matrix tracks, 24 map to a native equivalent and 4
19+
are not supported at all. The remaining 10 are partial, and not all in the same
20+
way. Some render natively with an approximated styling detail — distinct
21+
per-corner radii collapse to one value, numeric dash arrays map to the nearest
22+
preset, a radial gradient uses the closest DrawingML shade. Others lose something
23+
the format cannot carry: bookmarks beyond the first on a slide, parts of an inline
24+
SVG, the metadata producer field. Both kinds are listed under limitations below.
2125

2226
The `@Beta` marker covers the *API shape* (`PptxFixedLayoutBackend`, its builder,
2327
and the `PptxFragmentRenderHandler` seam), which may still change in a minor
@@ -54,8 +58,11 @@ the slide simply takes that size.
5458

5559
- **Clipping falls back to a raster island.** A clipped composite is re-rendered
5660
through the PDF backend and placed as a picture, so that region loses text
57-
editability and any run-level links inside it. It is pixel-accurate and can be
58-
switched off with `PptxFixedLayoutBackend.builder().clipRasterFallback(false)`.
61+
editability and any run-level links inside it. It is pixel-accurate — the raster
62+
targets a 2048-pixel long edge, clamped between native size and 4×, so a region
63+
larger than that is rendered at native resolution rather than downscaled, at a
64+
transient memory cost proportional to its size. Switch it off with
65+
`PptxFixedLayoutBackend.builder().clipRasterFallback(false)`.
5966
True vector clipping is tracked in
6067
[#413](https://github.com/DemchaAV/GraphCompose/issues/413).
6168
- **Glyphs are drawn by the viewer, not by GraphCompose.** Shape frames, line
@@ -74,6 +81,15 @@ the slide simply takes that size.
7481
backend — POI's slide rasteriser cannot honour embedded fonts. The session-level
7582
`toImage(...)` / `toImages(...)` are unaffected: they resolve the PDF backend
7683
explicitly.
84+
- **Bookmarks do not survive as a tree.** PPTX has no outline concept, so the
85+
first bookmark on a page names its slide and further bookmarks on that page are
86+
dropped with a debug note. A bookmark-heavy document loses most of its
87+
navigation structure; hyperlinks and internal slide jumps are unaffected.
88+
- **Inline SVG is native only for simple layers.** Arbitrary clips, exact
89+
dash/cap/join styles and off-viewBox art fall back to a transparent PNG, and
90+
gradient paints use their primary colour.
91+
- **Document metadata loses its producer value** — OPC core properties have no
92+
equivalent field.
7793
- **Multi-section documents** render into one deck; the sections must share a
7894
slide size.
7995

0 commit comments

Comments
 (0)