Paper Office
paper-pptxAPI referenceshapes.placeholder

PlaceholderGraphicFrame

paper-pptx 0.2.0 API reference

Placeholder shape populated with a table, chart, or smart art.

Attributes

chart

attributechartChart

The Chart object containing the chart in this graphic frame.

Raises ValueError if this graphic frame does not contain a chart.

chart_part

attributechart_partChartPart

The ChartPart object containing the chart in this graphic frame.

click_action

attributeclick_actionActionSetting

ActionSetting instance providing access to click behaviors.

Click behaviors are hyperlink-like behaviors including jumping to a hyperlink (web page) or to another slide in the presentation. The click action is that defined on the overall shape, not a run of text within the shape. An ActionSetting object is always returned, even when no click behavior is defined on the shape.

element

attributeelementShapeElement

lxml element for this shape, e.g. a CT_Shape instance.

Note that manipulating this element improperly can produce an invalid presentation file. Make sure you know what you're doing if you use this to change the underlying XML.

has_chart

attributehas_chartbool

True if this graphic frame contains a chart object. False otherwise.

When True, the chart object can be accessed using the .chart property.

has_table

attributehas_tablebool

True if this graphic frame contains a table object, False otherwise.

When True, the table object can be accessed using the .table property.

has_text_frame

attributehas_text_framebool

True if this shape can contain text.

height

attributeheightLength

Read/write. Integer distance between top and bottom extents of shape in EMUs.

is_placeholder

attributeis_placeholder

Boolean indicating whether this shape is a placeholder. Unconditionally True in this case.

left

attributeleftLength

Integer distance of the left edge of this shape from the left edge of the slide.

Read/write. Expressed in English Metric Units (EMU)

name

attributenamestr

Name of this shape, e.g. 'Picture 7'.

ole_format

attributeole_format_OleFormat

_OleFormat object for this graphic-frame shape.

Raises ValueError on a GraphicFrame instance that does not contain an OLE object.

An shape that contains an OLE object will have .shape_type of either EMBEDDED_OLE_OBJECT or LINKED_OLE_OBJECT.

part

attributepartBaseSlidePart

The package part containing this shape.

A BaseSlidePart subclass in this case. Access to a slide part should only be required if you are extending the behavior of pp API objects.

placeholder_format

attributeplaceholder_format_PlaceholderFormat

Provides access to placeholder-specific properties such as placeholder type.

Raises ValueError on access if the shape is not a placeholder.

rotation

attributerotationfloat

Degrees of clockwise rotation.

Read/write float. Negative values can be assigned to indicate counter-clockwise rotation, e.g. assigning -45.0 will change setting to 315.0.

shadow

attributeshadowShadowFormat

Unconditionally raises NotImplementedError.

Access to the shadow effect for graphic-frame objects is content-specific (i.e. different for charts, tables, etc.) and has not yet been implemented.

shape_id

attributeshape_idint

Read-only positive integer identifying this shape.

The id of a shape is unique among all shapes on a slide.

shape_type

attributeshape_typeMSO_SHAPE_TYPE

Optional member of MSO_SHAPE_TYPE identifying the type of this shape.

Possible values are MSO_SHAPE_TYPE.CHART, MSO_SHAPE_TYPE.TABLE, MSO_SHAPE_TYPE.EMBEDDED_OLE_OBJECT, MSO_SHAPE_TYPE.LINKED_OLE_OBJECT.

This value is None when none of these four types apply, for example when the shape contains SmartArt.

table

attributetableTable

The Table object contained in this graphic frame.

Raises ValueError if this graphic frame does not contain a table.

top

attributetopLength

Distance from the top edge of the slide to the top edge of this shape.

Read/write. Expressed in English Metric Units (EMU)

width

attributewidthLength

Distance between left and right extents of this shape.

Read/write. Expressed in English Metric Units (EMU).

On this page