util Module

Utility functions and classes that come in handy when working with PowerPoint and Open XML.

class pptx.util.Length[source]

Bases: int

Base class for length classes Inches, Emu, Cm, Mm, Pt, and Px. Provides properties for converting length values to convenient units.

inches

Floating point length in inches

centipoints

Integer length in hundredths of a point (1/7200 inch). Used internally because PowerPoint stores font size in centipoints.

cm

Floating point length in centimeters

emu

Integer length in English Metric Units

mm

Floating point length in millimeters

pt

Floating point length in points

px

Integer length in pixels. Note this value is platform dependent, using 96 pixels/inch on Windows, 72 pixels/inch on all other platforms.

class pptx.util.Inches[source]

Bases: pptx.util.Length

Convenience constructor for length in inches

class pptx.util.Centipoints[source]

Bases: pptx.util.Length

Convenience constructor for length in hundredths of a point

class pptx.util.Cm[source]

Bases: pptx.util.Length

Convenience constructor for length in centimeters

class pptx.util.Emu[source]

Bases: pptx.util.Length

Convenience constructor for length in english metric units

class pptx.util.Mm[source]

Bases: pptx.util.Length

Convenience constructor for length in millimeters

class pptx.util.Pt[source]

Bases: pptx.util.Length

Convenience value class for specifying a length in points

class pptx.util.Px[source]

Bases: pptx.util.Length

Convenience constructor for length in pixels