Represents a single slide in a presentation.
Slides are created independently with new/1 or new/2, then populated
with content using pipe-friendly functions, and finally added to a
presentation with Podium.add_slide/2.
Example
slide =
Podium.Slide.new(:title_content)
|> Podium.add_chart(:bar, data, x: {1, :in}, y: {2, :in}, width: {8, :in}, height: {4, :in})
|> Podium.add_image(png, x: {1, :in}, y: {1, :in})
|> Podium.add_text_box("Hello", x: {1, :in}, y: {6, :in}, width: {4, :in}, height: {1, :in})
prs
|> Podium.add_slide(slide)
|> Podium.save("output.pptx")
Summary
Functions
Adds an auto shape to the slide.
Adds a chart to the slide.
Adds a combo chart to the slide.
Adds a connector to the slide.
Adds a freeform shape to the slide.
Adds an image to the slide.
Adds a text box with a picture fill. The image binary is stored for packaging.
Adds a table to the slide.
Adds a text box shape to the slide.
Adds a video to the slide.
Creates a new slide with the given layout.
Returns the partname for this slide within the package.
Returns the rels partname for this slide.
Sets a picture placeholder on the slide. Stores the placeholder, binary, and extension for later index assignment during serialization.
Generates the slide XML including all shapes, chart graphic frames, and images.
chart_rids is a list of {chart, rId} tuples.
image_rids is a list of {image, rId} tuples.
Types
@type t() :: %Podium.Slide{ background: term(), background_image: {binary(), String.t()} | nil, charts: [Podium.Chart.t()], connectors: [Podium.Connector.t()], fill_images: [{pos_integer(), binary(), String.t()}], images: [Podium.Image.t()], index: pos_integer() | nil, layout_index: pos_integer() | nil, next_shape_id: pos_integer(), notes_text: String.t() | nil, picture_placeholders: [tuple()], placeholders: [Podium.Placeholder.t()], pres_rid: String.t() | nil, ref: reference() | nil, shapes: [Podium.Shape.t()], tables: [Podium.Table.t()], videos: [Podium.Video.t()] }
Functions
Adds an auto shape to the slide.
Adds a chart to the slide.
Adds a combo chart to the slide.
@spec add_connector( t(), Podium.connector_type(), Podium.dimension(), Podium.dimension(), Podium.dimension(), Podium.dimension(), keyword() ) :: t()
Adds a connector to the slide.
@spec add_freeform(t(), Podium.Freeform.t(), keyword()) :: t()
Adds a freeform shape to the slide.
Adds an image to the slide.
@spec add_picture_fill_text_box(t(), Podium.rich_text(), binary(), keyword()) :: t()
Adds a text box with a picture fill. The image binary is stored for packaging.
Adds a table to the slide.
@spec add_text_box(t(), Podium.rich_text(), keyword()) :: t()
Adds a text box shape to the slide.
Adds a video to the slide.
@spec new( Podium.layout(), keyword() ) :: t()
Creates a new slide with the given layout.
The first argument is a layout atom or integer index. Options can set the slide background and notes.
Options
:background- background fill (hex color, gradient tuple, pattern tuple, or{:picture, binary}):notes- speaker notes text
Available layouts
:title_slide(1),:title_content(2),:section_header(3),:two_content(4),:comparison(5),:title_only(6),:blank(7),:content_caption(8),:picture_caption(9),:title_vertical_text(10),:vertical_title_text(11)
Returns the partname for this slide within the package.
Returns the rels partname for this slide.
Sets a picture placeholder on the slide. Stores the placeholder, binary, and extension for later index assignment during serialization.
The placeholder is addressed either by a bundled-template name or by the
layout placeholder's own {type, idx} pair.
@spec to_xml( t(), [{Podium.Chart.t(), String.t()}], [{Podium.Image.t(), String.t()}], %{required(pos_integer()) => String.t()}, %{required(String.t()) => String.t()}, String.t() | nil, [{Podium.Video.t(), String.t(), String.t(), String.t()}] ) :: String.t()
Generates the slide XML including all shapes, chart graphic frames, and images.
chart_rids is a list of {chart, rId} tuples.
image_rids is a list of {image, rId} tuples.