Get slide dimensions from slide object. Args: slide: Slide object Returns: Tuple of (width_emu, height_emu) or (None, None) if not found
(slide: Any)
| 344 | |
| 345 | @staticmethod |
| 346 | def get_slide_dimensions(slide: Any) -> tuple[Optional[int], Optional[int]]: |
| 347 | """Get slide dimensions from slide object. |
| 348 | |
| 349 | Args: |
| 350 | slide: Slide object |
| 351 | |
| 352 | Returns: |
| 353 | Tuple of (width_emu, height_emu) or (None, None) if not found |
| 354 | """ |
| 355 | try: |
| 356 | prs = slide.part.package.presentation_part.presentation |
| 357 | return prs.slide_width, prs.slide_height |
| 358 | except (AttributeError, TypeError): |
| 359 | return None, None |
| 360 | |
| 361 | @staticmethod |
| 362 | def get_default_font_size(shape: BaseShape, slide_layout: Any) -> Optional[float]: |