OPC (Open Packaging Convention) ZIP package read/write operations.
Reads and writes .pptx files as ZIP archives containing XML parts and
binary resources. Each part is represented as a %{path => binary} map.
Summary
Functions
Reads a .pptx file from disk and returns a map of %{path => binary}.
Reads a .pptx from an in-memory ZIP binary and returns a map of %{path => binary}.
Reads the default.pptx template bundled with the library.
Reads a .pptx from either a filesystem path or a ZIP binary.
Resolves a relationship target against the partname of the part that owns the relationship, returning a canonical package partname.
Writes a map of %{path => binary} as a .pptx (ZIP) file.
Writes a map of parts to an in-memory ZIP binary.
Functions
Reads a .pptx file from disk and returns a map of %{path => binary}.
Reads a .pptx from an in-memory ZIP binary and returns a map of %{path => binary}.
Reads the default.pptx template bundled with the library.
Reads a .pptx from either a filesystem path or a ZIP binary.
A binary starting with the ZIP local file header signature (PK\x03\x04) is
treated as pptx bytes; anything else is treated as a path.
Resolves a relationship target against the partname of the part that owns the relationship, returning a canonical package partname.
Targets are relative to the owning part's folder, so the same slide master is
slideMasters/slideMaster1.xml from ppt/presentation.xml and
../slideMasters/slideMaster1.xml from a slide layout. A target starting with
/ is already absolute from the package root.
iex> Podium.OPC.Package.resolve_partname("ppt/presentation.xml", "slideMasters/slideMaster1.xml")
"ppt/slideMasters/slideMaster1.xml"
iex> Podium.OPC.Package.resolve_partname("ppt/slideLayouts/slideLayout1.xml", "../slideMasters/slideMaster1.xml")
"ppt/slideMasters/slideMaster1.xml"
iex> Podium.OPC.Package.resolve_partname("ppt/slideLayouts/slideLayout1.xml", "/ppt/media/logo.png")
"ppt/media/logo.png"
Writes a map of %{path => binary} as a .pptx (ZIP) file.
Writes a map of parts to an in-memory ZIP binary.