PresentationML (PML) presentation. Not intended to be constructed directly. Use :func:`pptx.Presentation` to open or create a presentation.
| 16 | |
| 17 | |
| 18 | class Presentation(PartElementProxy): |
| 19 | """PresentationML (PML) presentation. |
| 20 | |
| 21 | Not intended to be constructed directly. Use :func:`pptx.Presentation` to open or |
| 22 | create a presentation. |
| 23 | """ |
| 24 | |
| 25 | _element: CT_Presentation |
| 26 | part: PresentationPart # pyright: ignore[reportIncompatibleMethodOverride] |
| 27 | |
| 28 | @property |
| 29 | def core_properties(self): |
| 30 | """|CoreProperties| instance for this presentation. |
| 31 | |
| 32 | Provides read/write access to the Dublin Core document properties for the presentation. |
| 33 | """ |
| 34 | return self.part.core_properties |
| 35 | |
| 36 | @property |
| 37 | def notes_master(self) -> NotesMaster: |
| 38 | """Instance of |NotesMaster| for this presentation. |
| 39 | |
| 40 | If the presentation does not have a notes master, one is created from a default template |
| 41 | and returned. The same single instance is returned on each call. |
| 42 | """ |
| 43 | return self.part.notes_master |
| 44 | |
| 45 | def save(self, file: str | IO[bytes]): |
| 46 | """Writes this presentation to `file`. |
| 47 | |
| 48 | `file` can be either a file-path or a file-like object open for writing bytes. |
| 49 | """ |
| 50 | self.part.save(file) |
| 51 | |
| 52 | @property |
| 53 | def slide_height(self) -> Length | None: |
| 54 | """Height of slides in this presentation, in English Metric Units (EMU). |
| 55 | |
| 56 | Returns |None| if no slide width is defined. Read/write. |
| 57 | """ |
| 58 | sldSz = self._element.sldSz |
| 59 | if sldSz is None: |
| 60 | return None |
| 61 | return sldSz.cy |
| 62 | |
| 63 | @slide_height.setter |
| 64 | def slide_height(self, height: Length): |
| 65 | sldSz = self._element.get_or_add_sldSz() |
| 66 | sldSz.cy = height |
| 67 | |
| 68 | @property |
| 69 | def slide_layouts(self) -> SlideLayouts: |
| 70 | """|SlideLayouts| collection belonging to the first |SlideMaster| of this presentation. |
| 71 | |
| 72 | A presentation can have more than one slide master and each master will have its own set |
| 73 | of layouts. This property is a convenience for the common case where the presentation has |
| 74 | only a single slide master. |
| 75 | """ |
no outgoing calls
searching dependent graphs…