MCPcopy Create free account
hub / github.com/SpaceZephyr/myskill / get_slide_dimensions

Method get_slide_dimensions

pptx/scripts/inventory.py:346–359  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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]:

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected