Internal module managing presentation state, slide collection, and serialization.
This module handles the lifecycle of a presentation: creating from a template,
adding slides, and building the final OPC package. Index allocation for slides,
charts, images, and media is deferred to serialization time via resolve_indices/1.
Most users interact through the Podium facade module.
Summary
Functions
Adds a slide to the presentation. Returns the updated presentation.
Creates a new presentation from an arbitrary template package.
Creates a new presentation from the default template.
Replaces a slide in the presentation (by matching slide ref).
Saves the presentation to a file.
Saves the presentation to an in-memory binary.
Places a chart into a content placeholder. Returns the updated slide.
Sets core document properties (Dublin Core metadata).
Sets presentation-level footer, date, and slide number options.
Sets notes text on a slide. Returns the updated slide.
Places a table into a content placeholder. Returns the updated slide.
Types
@type t() :: %Podium.Presentation{ content_types: Podium.OPC.ContentTypes.t() | nil, core_properties: Podium.CoreProperties.t() | nil, footer: keyword() | nil, notes_count: non_neg_integer(), notes_master_created: boolean(), notes_master_partname: String.t(), notes_master_rid: String.t() | nil, pres_rels: Podium.OPC.Relationships.t() | nil, slide_height: non_neg_integer(), slide_width: non_neg_integer(), slides: [Podium.Slide.t()], template: :bundled | :custom, template_info: Podium.Template.t() | nil, template_parts: map() | nil, template_width: non_neg_integer() }
Functions
@spec add_slide(t(), Podium.Slide.t()) :: t()
Adds a slide to the presentation. Returns the updated presentation.
Raises when the template has no layout at the slide's layout index, or when a placeholder on the slide does not match one the layout defines.
Creates a new presentation from an arbitrary template package.
source is either a path to a .pptx/.potx file or its bytes. The slide
size is taken from the template and coordinates are never scaled. The template
must contain no slides.
Creates a new presentation from the default template.
@spec put_slide(t(), Podium.Slide.t()) :: t()
Replaces a slide in the presentation (by matching slide ref).
Saves the presentation to a file.
Saves the presentation to an in-memory binary.
@spec set_chart_placeholder( t(), Podium.Slide.t(), atom() | {String.t(), non_neg_integer()}, atom(), struct(), keyword() ) :: Podium.Slide.t()
Places a chart into a content placeholder. Returns the updated slide.
The placeholder is addressed either by a bundled-template name or by the
{type, idx} pair Podium.Template.inspect/1 reports for it. Position and
size are taken from the layout.
Sets core document properties (Dublin Core metadata).
@spec set_notes(Podium.Slide.t(), String.t()) :: Podium.Slide.t()
Sets notes text on a slide. Returns the updated slide.
@spec set_table_placeholder( t(), Podium.Slide.t(), atom() | {String.t(), non_neg_integer()}, [[term()]], keyword() ) :: Podium.Slide.t()
Places a table into a content placeholder. Returns the updated slide.
The placeholder is addressed either by a bundled-template name or by the
{type, idx} pair Podium.Template.inspect/1 reports for it. Position and
size are taken from the layout.