A .pptx file is a ZIP archive that follows the Open Packaging Conventions
(OPC), Part 2 of ECMA-376 and ISO/IEC 29500. Each ZIP member is a part. A part’s
relationships say which other parts it uses, and
[Content_Types].xml says what each part is. Word files use the same scheme:
see the DOCX package page for the
general rules.
The usual parts
| Part | Holds |
|---|---|
[Content_Types].xml | The media type of every part. |
_rels/.rels | The package’s relationships: the main part and the properties. |
ppt/presentation.xml | The presentation: slide order and size. |
ppt/_rels/presentation.xml.rels | Its relationships to the slides and masters. |
ppt/slides/slide1.xml | One slide each. |
ppt/slideLayouts/, ppt/slideMasters/ | Layouts and masters. |
ppt/notesSlides/, ppt/notesMasters/ | Speaker notes and their master. |
ppt/comments/, ppt/commentAuthors.xml | Comments and their authors. |
ppt/theme/theme1.xml | Themes. |
ppt/media/, ppt/embeddings/ | Pictures, audio, video and embedded files. |
ppt/presProps.xml, ppt/viewProps.xml, ppt/tableStyles.xml | Presentation and view settings and table styles. |
ppt/vbaProject.bin | The macro project. |
docProps/core.xml, docProps/app.xml, docProps/custom.xml | Document properties. |
docProps/thumbnail.jpeg | A small picture of the first slide, when one was saved. |
Writers normally use this layout, but other names are allowed, so a reader finds parts through the relationships.
Content types
The main part’s content type tells the kinds of PowerPoint file apart:
| Extension | Main part content type |
|---|---|
.pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml |
.pptm | application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml |
.ppsx | application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml |
.ppsm | application/vnd.ms-powerpoint.slideshow.macroEnabled.main+xml |
.potx | application/vnd.openxmlformats-officedocument.presentationml.template.main+xml |
.potm | application/vnd.ms-powerpoint.template.macroEnabled.main+xml |
Other parts have types of the form
application/vnd.openxmlformats-officedocument.presentationml.slide+xml:
slide, slideLayout, slideMaster,
notesSlide, notesMaster, handoutMaster,
comments, commentAuthors, presProps,
viewProps, tableStyles.
Relationship types
The types used in presentations, all with the prefix
http://schemas.openxmlformats.org/officeDocument/2006/relationships/ unless
shown.
| Type | From | To |
|---|---|---|
officeDocument | Package | The presentation part. |
extended-properties, custom-properties | Package | Application and custom properties. |
http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties | Package | Core properties. |
slide | Presentation | Each slide. |
slideMaster | Presentation, layout | A slide master. |
notesMaster, handoutMaster | Presentation | The notes and handout masters. |
slideLayout | Slide, master | The layout a slide is based on. |
notesSlide | Slide | That slide’s notes. |
comments | Slide | That slide’s comments. |
theme | Master | The theme. |
image, audio, video | Slide and others | Media; may be external. |
hyperlink | Slide | A link, usually external. |
oleObject, package | Slide | An embedded object or file. |
chart | Slide | A chart. |
diagramData and related | Slide | SmartArt data. |
http://schemas.microsoft.com/office/2006/relationships/vbaProject | Presentation | The macro project. |
A relationship with TargetMode="External" points outside the package. The
explorer lists external targets and never fetches them.
Reading a package
- Read the ZIP central directory.
- Read
_rels/.relsand follow theofficeDocumentrelationship. - Check that part’s root element is
presentationin the PresentationML namespace. - Read its relationships to find the slides, masters and themes.
A password-protected PowerPoint file is not a ZIP archive: it is a Compound File with an
EncryptedPackage stream.