Commit 9eedf39
authored
docs(examples): publish the PPTX twins in the showcase (#443)
* docs(examples): add PDF→PPTX twins for the business, financial, and master reports
The 2.1 PPTX backend shipped with one bespoke twin-output hero and the
Engine Deck PPTX. Add editable-PowerPoint twins for three real document
examples so the "one source, two formats" story spans everyday business
documents: BusinessReportPptxExample, FinancialReportPptxExample, and
MasterShowcasePptxExample each reuse their source example's composition and
emit the deck via buildPptx().
Extract a shared document(Path) session factory and a compose(DocumentSession)
method on BusinessReportExample and MasterShowcaseExample (FinancialReport
already had compose()), so the PDF generate() and the PPTX twin build from an
identical session config kept in one place. The report bodies are unchanged —
the large line counts on those two files are the method-extraction re-indent
(review with git diff -w).
FlagshipPptxTwinNativeShapeTest opens each rendered deck with Apache POI and
asserts native shapes dominate with only the genuinely un-vectorizable regions
rasterising (a clip-masked composite, a photo, two barcodes). The twins are
registered in GenerateAllExamples (exercised by the generate-every-example
smoke test) and linked from the examples gallery with committed .pptx previews.
* docs(examples): publish the PPTX twins in the showcase
The showcase could not surface a deck at all. ShowcaseSync selected artifacts
with endsWith(".pdf") and a manifest entry carried a single `pdf` field, so the
flagships that render both formats advertised only half their output — on the
release that makes PowerPoint output the headline.
Teach the sync to pick up a same-named .pptx sitting beside a PDF, publish it
under web/showcase/pptx/, and carry it as an optional `pptx` field. The card
gains a Get PPTX action only when the example actually rendered one, so the 82
PDF-only cards are untouched rather than carrying a dead link. The deck reuses
the PDF's thumbnail: both backends draw the same resolved layout, so a separate
render would be the same picture, and POI has no page rasterizer to make one.
Five flagships now ship both formats — business-report, engine-deck,
financial-report, master-showcase and twin-output, the last of which had no
showcase card at all until now. maven-banner renders a deck with no PDF sibling;
cards are PDF-driven and there is nothing to build its preview from, so it stays
out.
Fix a duplicate tag chip while regenerating: every entry passes its group as a
tag and withCategory prepends the same value, so 37 cards rendered the chip
twice. Deduplicating inside withCategory covers all of them and cannot be
reintroduced from a call site.
The three new twin examples came from a branch predating the removal of the
no-arg buildPptx(); they now name their destination like every other example.
Verified: full reactor clean verify green (1522 tests, 0 failures). Checked in
the running site — 5 of 87 cards carry the action, PDF-only cards show exactly
View PDF + View Code, the deck serves 200 with the OOXML content type and a PK
signature, no card renders a duplicate tag, and every manifest path resolves on
disk. Regeneration churn (every PDF re-renders with a fresh timestamp, 24 PNGs
re-encode) is deliberately left out; the release cut regenerates it wholesale.1 parent 9fbf76d commit 9eedf39
23 files changed
Lines changed: 859 additions & 505 deletions
File tree
- assets/readme/examples
- examples
- src
- main/java/com/demcha/examples
- flagships
- support
- test/java/com/demcha/examples/flagships
- web
- showcase
- pdf/flagships/default
- pptx/flagships/default
- screenshots/flagships/default
Binary file not shown.
Binary file not shown.
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
| 1107 | + | |
| 1108 | + | |
1107 | 1109 | | |
1108 | | - | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
1109 | 1113 | | |
1110 | 1114 | | |
1111 | 1115 | | |
| |||
1115 | 1119 | | |
1116 | 1120 | | |
1117 | 1121 | | |
| 1122 | + | |
| 1123 | + | |
1118 | 1124 | | |
1119 | | - | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
1120 | 1128 | | |
1121 | 1129 | | |
1122 | 1130 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
| 221 | + | |
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
220 | 225 | | |
221 | 226 | | |
| 227 | + | |
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
| |||
0 commit comments