Skip to content

feat(api): PPTX convenience trio on DocumentSession#415

Merged
DemchaAV merged 1 commit into
developfrom
feature/pptx-session-api
Jul 18, 2026
Merged

feat(api): PPTX convenience trio on DocumentSession#415
DemchaAV merged 1 commit into
developfrom
feature/pptx-session-api

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

Rendering a deck required importing the backend and calling session.render(new PptxFixedLayoutBackend()) by hand — the session's chrome (metadata, watermark, headers/footers) silently did not apply on that path, and there was no PPTX equivalent of the toPdfBytes/writePdf/buildPdf convenience surface.

What

  • DocumentSession.toPptxBytes(), writePptx(OutputStream), buildPptx(), and buildPptx(Path) mirror the PDF trio's contracts: caller-owned streams stay open, the no-arg build uses the builder's default output file, and the session's chrome flows into the deck exactly as it does into the PDF.
  • The backend resolves through the format-keyed provider (BackendProviders.fixedLayout("pptx")), so core gains no PPTX dependency; without graph-compose-render-pptx on the classpath the call fails with the existing MissingBackendException naming the artifact to add.
  • Internally the facade's PDF paths and the new PPTX paths share one format-generic pipeline (renderBytes/writeFixedLayout/buildFixedLayout), byte-for-byte faithful to the previous PDF behaviour — log keys, null checks, and exception flow unchanged apart from the format placeholder.
  • Docs follow the surface: capability matrix row, docs/capabilities.md output table, lifecycle diagram, the empty-document and default-output-file diagnostics, and the MissingBackendException examples now name both formats.

Verification

  • 7 new session-level tests: chrome flow-through on a two-page deck (metadata in OPC properties, footer tokens restarting per page), slide-count identity with the resolved layout graph, caller-owned-stream contract, explicit-path and default-file builds, and the failure modes (no default file, empty session, null stream passing through unwrapped, closed session).
  • Core's backend-free MissingBackendContractTest already pins the "pptx" missing-format diagnostics.
  • Full reactor gate green: clean verify across core, render-pdf, render-docx, render-pptx, templates, testing, root, bundle, qa, coverage.

@DemchaAV
DemchaAV merged commit f3e06a0 into develop Jul 18, 2026
12 checks passed
@DemchaAV
DemchaAV deleted the feature/pptx-session-api branch July 18, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant