├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .readthedocs.yaml ├── .travis.yml ├── HISTORY.rst ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.rst ├── docs ├── .themes │ └── armstrong │ │ ├── LICENSE │ │ ├── layout.html │ │ ├── rtd-themes.conf │ │ ├── static │ │ └── rtd.css_t │ │ ├── theme.conf │ │ └── theme.conf.orig ├── Makefile ├── _static │ └── img │ │ ├── add-picture.png │ │ ├── add-shape.png │ │ ├── add-table.png │ │ ├── add-textbox.png │ │ ├── bullet-slide.png │ │ ├── chart-01.png │ │ ├── chart-02.png │ │ ├── chart-03.png │ │ ├── chart-04.png │ │ ├── chart-05.png │ │ ├── chart-06.png │ │ ├── chart-07.png │ │ ├── chart-08.png │ │ ├── chart-09.png │ │ ├── freeform-01.png │ │ ├── freeform-02.png │ │ ├── freeform-03.png │ │ ├── hello-world.png │ │ ├── table-01.png │ │ ├── table-02.png │ │ ├── table-03.png │ │ ├── table-04.png │ │ ├── table-05.png │ │ ├── table-06.png │ │ └── table-07.png ├── _templates │ └── sidebarlinks.html ├── api │ ├── action.rst │ ├── chart-data.rst │ ├── chart.rst │ ├── dml.rst │ ├── enum │ │ ├── ExcelNumFormat.rst │ │ ├── MsoAutoShapeType.rst │ │ ├── MsoAutoSize.rst │ │ ├── MsoColorType.rst │ │ ├── MsoConnectorType.rst │ │ ├── MsoFillType.rst │ │ ├── MsoLanguageId.rst │ │ ├── MsoLineDashStyle.rst │ │ ├── MsoPatternType.rst │ │ ├── MsoShapeType.rst │ │ ├── MsoTextUnderlineType.rst │ │ ├── MsoThemeColorIndex.rst │ │ ├── MsoVerticalAnchor.rst │ │ ├── PpActionType.rst │ │ ├── PpMediaType.rst │ │ ├── PpParagraphAlignment.rst │ │ ├── PpPlaceholderType.rst │ │ ├── XlAxisCrosses.rst │ │ ├── XlCategoryType.rst │ │ ├── XlChartType.rst │ │ ├── XlDataLabelPosition.rst │ │ ├── XlLegendPosition.rst │ │ ├── XlMarkerStyle.rst │ │ ├── XlTickLabelPosition.rst │ │ ├── XlTickMark.rst │ │ └── index.rst │ ├── exc.rst │ ├── image.rst │ ├── placeholders.rst │ ├── presentation.rst │ ├── shapes.rst │ ├── slides.rst │ ├── table.rst │ ├── text.rst │ └── util.rst ├── community │ ├── faq.rst │ ├── support.rst │ └── updates.rst ├── conf.py ├── dev │ ├── analysis │ │ ├── cht-access-xlsx.rst │ │ ├── cht-add-chart.rst │ │ ├── cht-area-chart.rst │ │ ├── cht-axes.rst │ │ ├── cht-axis-has-gridlines.rst │ │ ├── cht-axis-title.rst │ │ ├── cht-axis-unit.rst │ │ ├── cht-bar-chart.rst │ │ ├── cht-bubble-chart.rst │ │ ├── cht-categories.rst │ │ ├── cht-chart-data.rst │ │ ├── cht-chart-overview.rst │ │ ├── cht-chart-shape.rst │ │ ├── cht-chart-title.rst │ │ ├── cht-chart-type.rst │ │ ├── cht-chart.rst │ │ ├── cht-data-labels.rst │ │ ├── cht-date-axis.rst │ │ ├── cht-doughnut-chart.rst │ │ ├── cht-invert-if-negative.rst │ │ ├── cht-legend.rst │ │ ├── cht-line-chart.rst │ │ ├── cht-marker.rst │ │ ├── cht-pie-chart.rst │ │ ├── cht-plot-data.rst │ │ ├── cht-plots.rst │ │ ├── cht-points.rst │ │ ├── cht-radar-chart.rst │ │ ├── cht-series.rst │ │ ├── cht-tick-labels.rst │ │ ├── cht-xy-chart.rst │ │ ├── dml-color.rst │ │ ├── dml-fill.rst │ │ ├── dml-gradient.rst │ │ ├── dml-line.rst │ │ ├── enumerations.rst │ │ ├── index.rst │ │ ├── pkg-coreprops.rst │ │ ├── placeholders │ │ │ ├── index.rst │ │ │ ├── layout-placeholders.rst │ │ │ ├── master-placeholders.rst │ │ │ └── slide-placeholders │ │ │ │ ├── index.rst │ │ │ │ ├── picture-placeholder.rst │ │ │ │ ├── placeholders-in-new-slide.rst │ │ │ │ └── table-placeholder.rst │ │ ├── prs-properties.rst │ │ ├── shp-autofit.rst │ │ ├── shp-autoshape.rst │ │ ├── shp-connector.rst │ │ ├── shp-freeform.rst │ │ ├── shp-graphfrm.rst │ │ ├── shp-group-shape.rst │ │ ├── shp-hyperlink.rst │ │ ├── shp-movie.rst │ │ ├── shp-ole-object.rst │ │ ├── shp-picture.rst │ │ ├── shp-pos-and-size.rst │ │ ├── shp-preset-geom.rst │ │ ├── shp-shadow.rst │ │ ├── shp-shapes.rst │ │ ├── sld-background.rst │ │ ├── sld-base.rst │ │ ├── sld-layout.rst │ │ ├── sld-master.rst │ │ ├── sld-notes-master.rst │ │ ├── sld-notes-slide.rst │ │ ├── sld-slide-shapes.rst │ │ ├── sld-slide.rst │ │ ├── tbl-merge.rst │ │ ├── tbl-table-style.rst │ │ ├── tbl-table.rst │ │ ├── txt-autofit-text.rst │ │ ├── txt-fit-text.rst │ │ ├── txt-font-color.rst │ │ ├── txt-font-typeface.rst │ │ ├── txt-font-underline.rst │ │ ├── txt-hyperlink.rst │ │ ├── txt-para-spacing.rst │ │ └── txt-text.rst │ ├── development_practices.rst │ ├── philosophy.rst │ ├── resources │ │ ├── about_packaging.rst │ │ ├── about_relationships.rst │ │ ├── applescript.rst │ │ ├── index.rst │ │ ├── odds_and_ends.rst │ │ ├── python_packaging.rst │ │ ├── technical_topics.rst │ │ └── web_resources.rst │ ├── runtests.rst │ └── xmlchemy.rst ├── index.rst └── user │ ├── autoshapes.rst │ ├── charts.rst │ ├── concepts.rst │ ├── install.rst │ ├── intro.rst │ ├── notes.rst │ ├── placeholders-understanding.rst │ ├── placeholders-using.rst │ ├── presentations.rst │ ├── quickstart.rst │ ├── slides.rst │ ├── table.rst │ ├── text.rst │ ├── understanding-shapes.rst │ └── use-cases.rst ├── features ├── act-action.feature ├── act-hyperlink.feature ├── cht-axis-props.feature ├── cht-axistitle-props.feature ├── cht-category-access.feature ├── cht-category-props.feature ├── cht-chart.feature ├── cht-charttitle-props.feature ├── cht-data-props.feature ├── cht-datalabels.feature ├── cht-gridlines-props.feature ├── cht-legend-access.feature ├── cht-legend-props.feature ├── cht-marker-props.feature ├── cht-plot-props.feature ├── cht-point-access.feature ├── cht-point-props.feature ├── cht-replace-data.feature ├── cht-series.feature ├── cht-ticklabels-props.feature ├── dml-color.feature ├── dml-effect.feature ├── dml-fill.feature ├── dml-line.feature ├── environment.py ├── ph-inherit-props.feature ├── ph-insert-shape.feature ├── ph-phfmt-props.feature ├── ph-placeholder-props.feature ├── prs-coreprops.feature ├── prs-default-template.feature ├── prs-open-save.feature ├── prs-presentation-props.feature ├── shp-autoshape.feature ├── shp-connector.feature ├── shp-freeform.feature ├── shp-graphicframe.feature ├── shp-groupshape.feature ├── shp-movie-props.feature ├── shp-picture.feature ├── shp-placeholder.feature ├── shp-shapes.feature ├── shp-shared.feature ├── sld-background.feature ├── sld-slide.feature ├── sld-slides.feature ├── steps │ ├── action.py │ ├── axis.py │ ├── background.py │ ├── category.py │ ├── chart.py │ ├── chartdata.py │ ├── color.py │ ├── coreprops.py │ ├── datalabel.py │ ├── effect.py │ ├── fill.py │ ├── font.py │ ├── font_color.py │ ├── helpers.py │ ├── legend.py │ ├── line.py │ ├── picture.py │ ├── placeholder.py │ ├── plot.py │ ├── presentation.py │ ├── series.py │ ├── shape.py │ ├── shapes.py │ ├── slide.py │ ├── slides.py │ ├── table.py │ ├── test_files │ │ ├── 72-dpi.tiff │ │ ├── CVS_LOGO.WMF │ │ ├── act-props.pptm │ │ ├── calibriz.ttf │ │ ├── cht-axis-props.pptx │ │ ├── cht-category-access.pptx │ │ ├── cht-chart-props.pptx │ │ ├── cht-chart-type.pptx │ │ ├── cht-charts.pptx │ │ ├── cht-datalabels.pptx │ │ ├── cht-gridlines-props.pptx │ │ ├── cht-legend-props.pptx │ │ ├── cht-legend.pptx │ │ ├── cht-marker-props.pptx │ │ ├── cht-plot-props.pptx │ │ ├── cht-point-access.pptx │ │ ├── cht-point-props.pptx │ │ ├── cht-replace-data.pptx │ │ ├── cht-series.pptx │ │ ├── cht-ticklabels-props.pptx │ │ ├── dml-effect.pptx │ │ ├── dml-fill.pptx │ │ ├── dml-line.pptx │ │ ├── ext-rels.pptx │ │ ├── extracted-pptx │ │ │ ├── [Content_Types].xml │ │ │ ├── _rels │ │ │ │ └── .rels │ │ │ ├── docProps │ │ │ │ ├── app.xml │ │ │ │ ├── core.xml │ │ │ │ └── thumbnail.jpeg │ │ │ └── ppt │ │ │ │ ├── _rels │ │ │ │ └── presentation.xml.rels │ │ │ │ ├── presProps.xml │ │ │ │ ├── presentation.xml │ │ │ │ ├── printerSettings │ │ │ │ └── printerSettings1.bin │ │ │ │ ├── slideLayouts │ │ │ │ ├── _rels │ │ │ │ │ ├── slideLayout1.xml.rels │ │ │ │ │ ├── slideLayout10.xml.rels │ │ │ │ │ ├── slideLayout11.xml.rels │ │ │ │ │ ├── slideLayout2.xml.rels │ │ │ │ │ ├── slideLayout3.xml.rels │ │ │ │ │ ├── slideLayout4.xml.rels │ │ │ │ │ ├── slideLayout5.xml.rels │ │ │ │ │ ├── slideLayout6.xml.rels │ │ │ │ │ ├── slideLayout7.xml.rels │ │ │ │ │ ├── slideLayout8.xml.rels │ │ │ │ │ └── slideLayout9.xml.rels │ │ │ │ ├── slideLayout1.xml │ │ │ │ ├── slideLayout10.xml │ │ │ │ ├── slideLayout11.xml │ │ │ │ ├── slideLayout2.xml │ │ │ │ ├── slideLayout3.xml │ │ │ │ ├── slideLayout4.xml │ │ │ │ ├── slideLayout5.xml │ │ │ │ ├── slideLayout6.xml │ │ │ │ ├── slideLayout7.xml │ │ │ │ ├── slideLayout8.xml │ │ │ │ └── slideLayout9.xml │ │ │ │ ├── slideMasters │ │ │ │ ├── _rels │ │ │ │ │ └── slideMaster1.xml.rels │ │ │ │ └── slideMaster1.xml │ │ │ │ ├── slides │ │ │ │ ├── _rels │ │ │ │ │ └── slide1.xml.rels │ │ │ │ └── slide1.xml │ │ │ │ ├── tableStyles.xml │ │ │ │ ├── theme │ │ │ │ └── theme1.xml │ │ │ │ └── viewProps.xml │ │ ├── font-color.pptx │ │ ├── just-two-mice.mp4 │ │ ├── just-two-mice.png │ │ ├── lyt-shapes.pptx │ │ ├── minimal.pptx │ │ ├── monty-truth.png │ │ ├── mst-placeholders.pptx │ │ ├── mst-shapes.pptx │ │ ├── mst-slide-layouts.pptx │ │ ├── ph-inherit-props.pptx │ │ ├── ph-populated-placeholders.pptx │ │ ├── ph-unpopulated-placeholders.pptx │ │ ├── pic.emf │ │ ├── prs-add-slide.pptx │ │ ├── prs-notes.pptx │ │ ├── prs-properties.pptx │ │ ├── prs-slide-masters.pptx │ │ ├── python-icon.jpeg │ │ ├── python-powered.png │ │ ├── python.bmp │ │ ├── shp-access-chart.pptx │ │ ├── shp-access-ole-object.pptx │ │ ├── shp-autoshape-adjustments.pptx │ │ ├── shp-autoshape-props.pptx │ │ ├── shp-common-props.pptx │ │ ├── shp-connector-props.pptx │ │ ├── shp-embedded-docx.docx │ │ ├── shp-embedded-pptx.pptx │ │ ├── shp-embedded-xlsx.xlsx │ │ ├── shp-freeform.pptx │ │ ├── shp-groupshape.pptx │ │ ├── shp-movie-props.pptx │ │ ├── shp-picture.pptx │ │ ├── shp-pos-and-size.pptx │ │ ├── shp-shapes.pptx │ │ ├── sld-background.pptx │ │ ├── sld-blank.pptx │ │ ├── sld-notes.pptx │ │ ├── sld-slide.pptx │ │ ├── sld-slides.pptx │ │ ├── sonic.gif │ │ ├── tbl-cell.pptx │ │ ├── test-image-jpg-mime.pptx │ │ ├── test.pptx │ │ ├── txt-fit-text.pptx │ │ ├── txt-font-props.pptx │ │ ├── txt-font-typeface.pptx │ │ ├── txt-paragraph-spacing.pptx │ │ ├── txt-text-frame.pptx │ │ └── txt-text.pptx │ ├── text.py │ └── text_frame.py ├── tbl-cell.feature ├── tbl-column.feature ├── tbl-table.feature ├── txt-fit-text.feature ├── txt-font-color.feature ├── txt-font-props.feature ├── txt-paragraph.feature ├── txt-text.feature └── txt-textframe.feature ├── lab ├── README.txt ├── cust-elm-classes │ ├── gen_oxml_classes.py │ └── main.py └── parse_xsd │ ├── objectify_lab.py │ ├── parse_xsd.py │ ├── slide1.xml │ ├── validate.py │ └── xsd │ ├── dml-chart.xsd │ ├── dml-chartDrawing.xsd │ ├── dml-diagram.xsd │ ├── dml-lockedCanvas.xsd │ ├── dml-main.xsd │ ├── dml-picture.xsd │ ├── dml-spreadsheetDrawing.xsd │ ├── dml-wordprocessingDrawing.xsd │ ├── pml.xsd │ ├── shared-additionalCharacteristics.xsd │ ├── shared-bibliography.xsd │ ├── shared-commonSimpleTypes.xsd │ ├── shared-customXmlDataProperties.xsd │ ├── shared-customXmlSchemaProperties.xsd │ ├── shared-documentPropertiesCustom.xsd │ ├── shared-documentPropertiesExtended.xsd │ ├── shared-documentPropertiesVariantTypes.xsd │ ├── shared-math.xsd │ ├── shared-relationshipReference.xsd │ ├── sml.xsd │ ├── vml-main.xsd │ ├── vml-officeDrawing.xsd │ ├── vml-presentationDrawing.xsd │ ├── vml-spreadsheetDrawing.xsd │ ├── vml-wordprocessingDrawing.xsd │ └── wml.xsd ├── pyproject.toml ├── requirements-dev.txt ├── requirements-docs.txt ├── requirements-test.txt ├── requirements.txt ├── spec ├── ISO-IEC-29500-1 │ ├── ISO-IEC-29500-1.pdf │ └── schemas │ │ ├── dml-geometries │ │ └── OfficeOpenXML-DrawingMLGeometries │ │ │ ├── presetShapeDefinitions.xml │ │ │ └── presetTextWarpDefinitions.xml │ │ └── xsd │ │ ├── dml-chart.xsd │ │ ├── dml-chartDrawing.xsd │ │ ├── dml-diagram.xsd │ │ ├── dml-lockedCanvas.xsd │ │ ├── dml-main.xsd │ │ ├── dml-picture.xsd │ │ ├── dml-spreadsheetDrawing.xsd │ │ ├── dml-wordprocessingDrawing.xsd │ │ ├── pml.xsd │ │ ├── shared-additionalCharacteristics.xsd │ │ ├── shared-bibliography.xsd │ │ ├── shared-commonSimpleTypes.xsd │ │ ├── shared-customXmlDataProperties.xsd │ │ ├── shared-customXmlSchemaProperties.xsd │ │ ├── shared-documentPropertiesCustom.xsd │ │ ├── shared-documentPropertiesExtended.xsd │ │ ├── shared-documentPropertiesVariantTypes.xsd │ │ ├── shared-math.xsd │ │ ├── shared-relationshipReference.xsd │ │ ├── sml.xsd │ │ └── wml.xsd ├── ISO-IEC-29500-2 │ ├── ISO-IEC-29500-2.pdf │ └── opc-xsd │ │ ├── opc-contentTypes.xsd │ │ ├── opc-coreProperties.xsd │ │ ├── opc-digSig.xsd │ │ └── opc-relationships.xsd ├── ISO-IEC-29500-3 │ └── ISO-IEC-29500-3.pdf ├── ISO-IEC-29500-4 │ ├── ISO-IEC-29500-4.pdf │ └── xsd │ │ ├── dml-chart.xsd │ │ ├── dml-chartDrawing.xsd │ │ ├── dml-diagram.xsd │ │ ├── dml-lockedCanvas.xsd │ │ ├── dml-main.xsd │ │ ├── dml-picture.xsd │ │ ├── dml-spreadsheetDrawing.xsd │ │ ├── dml-wordprocessingDrawing.xsd │ │ ├── pml.xsd │ │ ├── shared-additionalCharacteristics.xsd │ │ ├── shared-bibliography.xsd │ │ ├── shared-commonSimpleTypes.xsd │ │ ├── shared-customXmlDataProperties.xsd │ │ ├── shared-customXmlSchemaProperties.xsd │ │ ├── shared-documentPropertiesCustom.xsd │ │ ├── shared-documentPropertiesExtended.xsd │ │ ├── shared-documentPropertiesVariantTypes.xsd │ │ ├── shared-math.xsd │ │ ├── shared-relationshipReference.xsd │ │ ├── sml.xsd │ │ ├── vml-main.xsd │ │ ├── vml-officeDrawing.xsd │ │ ├── vml-presentationDrawing.xsd │ │ ├── vml-spreadsheetDrawing.xsd │ │ ├── vml-wordprocessingDrawing.xsd │ │ └── wml.xsd └── gen_spec │ ├── Makefile │ ├── enum │ └── MsoAutoShapeType.xml │ ├── gen_spec.py │ ├── sql │ └── dump.sql │ └── src_data │ ├── enums │ └── MsoAutoShapeType │ │ ├── MsoAutoShapeType.txt │ │ ├── ST_ShapeType.xml │ │ └── mapping.txt │ ├── msoAutoShapeType.py │ └── scratch.py ├── src └── pptx │ ├── __init__.py │ ├── action.py │ ├── api.py │ ├── chart │ ├── __init__.py │ ├── axis.py │ ├── category.py │ ├── chart.py │ ├── data.py │ ├── datalabel.py │ ├── legend.py │ ├── marker.py │ ├── plot.py │ ├── point.py │ ├── series.py │ ├── xlsx.py │ └── xmlwriter.py │ ├── dml │ ├── __init__.py │ ├── chtfmt.py │ ├── color.py │ ├── effect.py │ ├── fill.py │ └── line.py │ ├── enum │ ├── __init__.py │ ├── action.py │ ├── base.py │ ├── chart.py │ ├── dml.py │ ├── lang.py │ ├── shapes.py │ └── text.py │ ├── exc.py │ ├── media.py │ ├── opc │ ├── __init__.py │ ├── constants.py │ ├── oxml.py │ ├── package.py │ ├── packuri.py │ ├── serialized.py │ ├── shared.py │ └── spec.py │ ├── oxml │ ├── __init__.py │ ├── action.py │ ├── chart │ │ ├── __init__.py │ │ ├── axis.py │ │ ├── chart.py │ │ ├── datalabel.py │ │ ├── legend.py │ │ ├── marker.py │ │ ├── plot.py │ │ ├── series.py │ │ └── shared.py │ ├── coreprops.py │ ├── dml │ │ ├── __init__.py │ │ ├── color.py │ │ ├── fill.py │ │ └── line.py │ ├── ns.py │ ├── presentation.py │ ├── shapes │ │ ├── __init__.py │ │ ├── autoshape.py │ │ ├── connector.py │ │ ├── graphfrm.py │ │ ├── groupshape.py │ │ ├── picture.py │ │ └── shared.py │ ├── simpletypes.py │ ├── slide.py │ ├── table.py │ ├── text.py │ ├── theme.py │ └── xmlchemy.py │ ├── package.py │ ├── parts │ ├── __init__.py │ ├── chart.py │ ├── coreprops.py │ ├── embeddedpackage.py │ ├── image.py │ ├── media.py │ ├── presentation.py │ └── slide.py │ ├── presentation.py │ ├── py.typed │ ├── shapes │ ├── __init__.py │ ├── autoshape.py │ ├── base.py │ ├── connector.py │ ├── freeform.py │ ├── graphfrm.py │ ├── group.py │ ├── picture.py │ ├── placeholder.py │ └── shapetree.py │ ├── shared.py │ ├── slide.py │ ├── spec.py │ ├── table.py │ ├── templates │ ├── default.pptx │ ├── docx-icon.emf │ ├── generic-icon.emf │ ├── notes.xml │ ├── notesMaster.xml │ ├── pptx-icon.emf │ ├── theme.xml │ └── xlsx-icon.emf │ ├── text │ ├── __init__.py │ ├── fonts.py │ ├── layout.py │ └── text.py │ ├── types.py │ └── util.py ├── tests ├── __init__.py ├── chart │ ├── __init__.py │ ├── test_axis.py │ ├── test_category.py │ ├── test_chart.py │ ├── test_data.py │ ├── test_datalabel.py │ ├── test_legend.py │ ├── test_marker.py │ ├── test_plot.py │ ├── test_point.py │ ├── test_series.py │ ├── test_xlsx.py │ └── test_xmlwriter.py ├── dml │ ├── __init__.py │ ├── test_chtfmt.py │ ├── test_color.py │ ├── test_effect.py │ ├── test_fill.py │ └── test_line.py ├── enum │ ├── __init__.py │ ├── test_base.py │ └── test_shapes.py ├── opc │ ├── __init__.py │ ├── test_oxml.py │ ├── test_package.py │ ├── test_packuri.py │ └── test_serialized.py ├── oxml │ ├── __init__.py │ ├── shapes │ │ ├── __init__.py │ │ ├── test_autoshape.py │ │ ├── test_graphfrm.py │ │ ├── test_groupshape.py │ │ └── test_picture.py │ ├── test___init__.py │ ├── test_dml.py │ ├── test_ns.py │ ├── test_presentation.py │ ├── test_simpletypes.py │ ├── test_slide.py │ ├── test_table.py │ ├── test_theme.py │ ├── test_xmlchemy.py │ └── unitdata │ │ ├── __init__.py │ │ ├── dml.py │ │ ├── shape.py │ │ └── text.py ├── parts │ ├── __init__.py │ ├── test_chart.py │ ├── test_coreprops.py │ ├── test_embeddedpackage.py │ ├── test_image.py │ ├── test_media.py │ ├── test_presentation.py │ └── test_slide.py ├── shapes │ ├── __init__.py │ ├── test_autoshape.py │ ├── test_base.py │ ├── test_connector.py │ ├── test_freeform.py │ ├── test_graphfrm.py │ ├── test_group.py │ ├── test_picture.py │ ├── test_placeholder.py │ └── test_shapetree.py ├── test_action.py ├── test_api.py ├── test_files │ ├── calibriz.ttf │ ├── cdw-logo.eps │ ├── dummy.mp4 │ ├── expanded_pptx │ │ ├── [Content_Types].xml │ │ ├── _rels │ │ │ └── .rels │ │ ├── docProps │ │ │ ├── app.xml │ │ │ ├── core.xml │ │ │ └── thumbnail.jpeg │ │ └── ppt │ │ │ ├── _rels │ │ │ └── presentation.xml.rels │ │ │ ├── presProps.xml │ │ │ ├── presentation.xml │ │ │ ├── printerSettings │ │ │ └── printerSettings1.bin │ │ │ ├── slideLayouts │ │ │ ├── _rels │ │ │ │ ├── slideLayout1.xml.rels │ │ │ │ ├── slideLayout10.xml.rels │ │ │ │ ├── slideLayout11.xml.rels │ │ │ │ ├── slideLayout2.xml.rels │ │ │ │ ├── slideLayout3.xml.rels │ │ │ │ ├── slideLayout4.xml.rels │ │ │ │ ├── slideLayout5.xml.rels │ │ │ │ ├── slideLayout6.xml.rels │ │ │ │ ├── slideLayout7.xml.rels │ │ │ │ ├── slideLayout8.xml.rels │ │ │ │ └── slideLayout9.xml.rels │ │ │ ├── slideLayout1.xml │ │ │ ├── slideLayout10.xml │ │ │ ├── slideLayout11.xml │ │ │ ├── slideLayout2.xml │ │ │ ├── slideLayout3.xml │ │ │ ├── slideLayout4.xml │ │ │ ├── slideLayout5.xml │ │ │ ├── slideLayout6.xml │ │ │ ├── slideLayout7.xml │ │ │ ├── slideLayout8.xml │ │ │ └── slideLayout9.xml │ │ │ ├── slideMasters │ │ │ ├── _rels │ │ │ │ └── slideMaster1.xml.rels │ │ │ └── slideMaster1.xml │ │ │ ├── slides │ │ │ ├── _rels │ │ │ │ └── slide1.xml.rels │ │ │ └── slide1.xml │ │ │ ├── tableStyles.xml │ │ │ ├── theme │ │ │ └── theme1.xml │ │ │ └── viewProps.xml │ ├── minimal.pptx │ ├── minimal_slide.xml │ ├── missing_rels_item.pptx │ ├── monty-truth.png │ ├── no-core-props.pptx │ ├── no-slides.pptx │ ├── presentation.xml │ ├── python-icon.jpeg │ ├── python-powered.png │ ├── python.bmp │ ├── slideLayout1.xml │ ├── snippets │ │ ├── 2x2-area-date.txt │ │ ├── 2x2-area-float.txt │ │ ├── 2x2-area-stacked-100.txt │ │ ├── 2x2-area-stacked.txt │ │ ├── 2x2-area.txt │ │ ├── 2x2-bar-clustered-date.txt │ │ ├── 2x2-bar-clustered-float.txt │ │ ├── 2x2-bar-clustered.txt │ │ ├── 2x2-bar-stacked-100.txt │ │ ├── 2x2-bar-stacked.txt │ │ ├── 2x2-column-clustered.txt │ │ ├── 2x2-column-stacked-100.txt │ │ ├── 2x2-column-stacked.txt │ │ ├── 2x2-line-date.txt │ │ ├── 2x2-line-float.txt │ │ ├── 2x2-line-markers-stacked-100.txt │ │ ├── 2x2-line-markers-stacked.txt │ │ ├── 2x2-line-markers.txt │ │ ├── 2x2-line-stacked-100.txt │ │ ├── 2x2-line-stacked.txt │ │ ├── 2x2-line.txt │ │ ├── 2x3-bubble-3d.txt │ │ ├── 2x3-bubble.txt │ │ ├── 2x3-xy-lines-no-markers.txt │ │ ├── 2x3-xy-lines.txt │ │ ├── 2x3-xy-smooth-no-markers.txt │ │ ├── 2x3-xy-smooth.txt │ │ ├── 2x3-xy.txt │ │ ├── 2x5-radar.txt │ │ ├── 3x1-pie-exploded.txt │ │ ├── 3x1-pie.txt │ │ ├── 3x2-doughnut-exploded.txt │ │ ├── 3x2-doughnut.txt │ │ ├── 4x2-multi-cat-bar.txt │ │ ├── adjust-ser-count.txt │ │ ├── cat-labels.txt │ │ ├── content-types-xml.txt │ │ ├── default-notes.txt │ │ ├── default-notesMaster.txt │ │ ├── default-theme.txt │ │ ├── freeform.txt │ │ ├── package-rels-xml.txt │ │ ├── placeholders.txt │ │ ├── presentation-rels-xml.txt │ │ ├── relationships.txt │ │ ├── rels-load-from-xml.txt │ │ ├── rewrite-ser.txt │ │ └── timing.txt │ ├── test.pptx │ └── test_slides.pptx ├── test_media.py ├── test_package.py ├── test_presentation.py ├── test_shared.py ├── test_slide.py ├── test_table.py ├── test_util.py ├── text │ ├── __init__.py │ ├── test_fonts.py │ ├── test_layout.py │ └── test_text.py ├── unitdata.py └── unitutil │ ├── __init__.py │ ├── cxml.py │ ├── file.py │ └── mock.py ├── tox.ini └── typings ├── behave ├── __init__.pyi └── runner.pyi └── lxml ├── _types.pyi └── etree ├── __init__.pyi ├── _classlookup.pyi ├── _cleanup.pyi ├── _element.pyi ├── _module_func.pyi ├── _module_misc.pyi ├── _nsclasses.pyi └── _parser.pyi /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | pull_request: 5 | branches: [ master ] 6 | push: 7 | branches: 8 | - master 9 | - develop 10 | 11 | permissions: 12 | contents: write 13 | 14 | jobs: 15 | 16 | build: 17 | runs-on: ubuntu-latest 18 | strategy: 19 | matrix: 20 | python-version: ["3.9", "3.10", "3.11", "3.12"] 21 | steps: 22 | - uses: actions/checkout@v4 23 | - name: Set up Python ${{ matrix.python-version }} 24 | uses: actions/setup-python@v5 25 | with: 26 | python-version: ${{ matrix.python-version }} 27 | - name: Display Python version 28 | run: python -c "import sys; print(sys.version)" 29 | - name: Install test dependencies 30 | run: | 31 | pip install . 32 | pip install -r requirements-test.txt 33 | - name: Test with pytest 34 | run: pytest --cov=pptx --cov-report term-missing tests 35 | - name: Acceptance tests with behave 36 | run: behave --stop 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | .cache 3 | .coverage 4 | /.tox/ 5 | /src/*.egg-info 6 | *.pyc 7 | /dist/ 8 | /docs/.build 9 | out.txt 10 | _scratch/ 11 | /spec/gen_spec/spec*.db 12 | tags 13 | /tests/debug.py 14 | -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | # -- set the OS, Python version and other tools you might need -- 4 | build: 5 | os: ubuntu-22.04 6 | tools: 7 | python: "3.9" 8 | 9 | # -- build documentation in the "docs/" directory with Sphinx -- 10 | sphinx: 11 | configuration: docs/conf.py 12 | # -- fail on all warnings to avoid broken references -- 13 | # fail_on_warning: true 14 | 15 | # -- package versions required to build your documentation -- 16 | # -- see https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html -- 17 | python: 18 | install: 19 | - requirements: requirements-docs.txt 20 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.8" 4 | - "3.6" 5 | - "2.7" 6 | 7 | # ---command to install dependencies, e.g. pip install -r requirements.txt 8 | install: 9 | - pip install -r requirements.txt 10 | 11 | # ---command to run tests, e.g. python setup.py test 12 | sudo: false 13 | script: py.test && behave --stop 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2013 Steve Canny, https://github.com/scanny 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include HISTORY.rst LICENSE README.rst tox.ini 2 | recursive-include features * 3 | recursive-include src/pptx/templates * 4 | recursive-include tests *.py 5 | recursive-include tests/test_files * 6 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | BEHAVE = behave 2 | MAKE = make 3 | 4 | .PHONY: help 5 | help: 6 | @echo "Please use \`make ' where is one or more of" 7 | @echo " accept run acceptance tests using behave" 8 | @echo " build generate both sdist and wheel suitable for upload to PyPI" 9 | @echo " clean delete intermediate work product and start fresh" 10 | @echo " cleandocs delete cached HTML documentation and start fresh" 11 | @echo " coverage run nosetests with coverage" 12 | @echo " docs build HTML documentation using Sphinx (incremental)" 13 | @echo " opendocs open local HTML documentation in browser" 14 | @echo " test-upload upload distribution to TestPyPI" 15 | @echo " upload upload distribution tarball to PyPI" 16 | 17 | .PHONY: accept 18 | accept: 19 | $(BEHAVE) --stop 20 | 21 | .PHONY: build 22 | build: 23 | rm -rf dist 24 | python -m build 25 | twine check dist/* 26 | 27 | .PHONY: clean 28 | clean: 29 | find . -type f -name \*.pyc -exec rm {} \; 30 | find . -type f -name .DS_Store -exec rm {} \; 31 | rm -rf dist .coverage 32 | 33 | .PHONY: cleandocs 34 | cleandocs: 35 | $(MAKE) -C docs clean 36 | 37 | .PHONY: coverage 38 | coverage: 39 | py.test --cov-report term-missing --cov=pptx --cov=tests 40 | 41 | .PHONY: docs 42 | docs: 43 | $(MAKE) -C docs html 44 | 45 | .PHONY: opendocs 46 | opendocs: 47 | open docs/.build/html/index.html 48 | 49 | .PHONY: test-upload 50 | test-upload: build 51 | twine upload --repository testpypi dist/* 52 | 53 | .PHONY: upload 54 | upload: clean build 55 | twine upload dist/* 56 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | *python-pptx* is a Python library for creating, reading, and updating PowerPoint (.pptx) 2 | files. 3 | 4 | A typical use would be generating a PowerPoint presentation from dynamic content such as 5 | a database query, analytics output, or a JSON payload, perhaps in response to an HTTP 6 | request and downloading the generated PPTX file in response. It runs on any Python 7 | capable platform, including macOS and Linux, and does not require the PowerPoint 8 | application to be installed or licensed. 9 | 10 | It can also be used to analyze PowerPoint files from a corpus, perhaps to extract search 11 | indexing text and images. 12 | 13 | In can also be used to simply automate the production of a slide or two that would be 14 | tedious to get right by hand, which is how this all got started. 15 | 16 | More information is available in the `python-pptx documentation`_. 17 | 18 | Browse `examples with screenshots`_ to get a quick idea what you can do with 19 | python-pptx. 20 | 21 | .. _`python-pptx documentation`: 22 | https://python-pptx.readthedocs.org/en/latest/ 23 | 24 | .. _`examples with screenshots`: 25 | https://python-pptx.readthedocs.org/en/latest/user/quickstart.html 26 | -------------------------------------------------------------------------------- /docs/.themes/armstrong/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Bay Citizen & Texas Tribune 2 | 3 | Original ReadTheDocs.org code 4 | Copyright (c) 2010 Charles Leifer, Eric Holscher, Bobby Grace 5 | 6 | Permission is hereby granted, free of charge, to any person 7 | obtaining a copy of this software and associated documentation 8 | files (the "Software"), to deal in the Software without 9 | restriction, including without limitation the rights to use, 10 | copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the 12 | Software is furnished to do so, subject to the following 13 | conditions: 14 | 15 | The above copyright notice and this permission notice shall be 16 | included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 20 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 22 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 23 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 25 | OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /docs/.themes/armstrong/rtd-themes.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = default 3 | stylesheet = rtd.css 4 | pygment_style = default 5 | show_sphinx = False 6 | 7 | [options] 8 | show_rtd = True 9 | 10 | white = #ffffff 11 | almost_white = #f8f8f8 12 | barely_white = #f2f2f2 13 | dirty_white = #eeeeee 14 | almost_dirty_white = #e6e6e6 15 | dirtier_white = #dddddd 16 | lighter_gray = #cccccc 17 | gray_a = #aaaaaa 18 | gray_9 = #999999 19 | light_gray = #888888 20 | gray_7 = #777777 21 | gray = #666666 22 | dark_gray = #444444 23 | gray_2 = #222222 24 | black = #111111 25 | light_color = #e8ecef 26 | light_medium_color = #DDEAF0 27 | medium_color = #8ca1af 28 | medium_color_link = #86989b 29 | medium_color_link_hover = #a6b8bb 30 | dark_color = #465158 31 | 32 | h1 = #000000 33 | h2 = #465158 34 | h3 = #6c818f 35 | 36 | link_color = #444444 37 | link_color_decoration = #CCCCCC 38 | 39 | medium_color_hover = #697983 40 | green_highlight = #8ecc4c 41 | 42 | 43 | positive_dark = #609060 44 | positive_medium = #70a070 45 | positive_light = #e9ffe9 46 | 47 | negative_dark = #900000 48 | negative_medium = #b04040 49 | negative_light = #ffe9e9 50 | negative_text = #c60f0f 51 | 52 | ruler = #abc 53 | 54 | viewcode_bg = #f4debf 55 | viewcode_border = #ac9 56 | 57 | highlight = #ffe080 58 | 59 | code_background = #eeeeee 60 | 61 | background = #465158 62 | background_link = #ffffff 63 | background_link_half = #ffffff 64 | background_text = #eeeeee 65 | background_text_link = #86989b 66 | -------------------------------------------------------------------------------- /docs/.themes/armstrong/theme.conf: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = default 3 | stylesheet = rtd.css 4 | pygment_style = default 5 | show_sphinx = False 6 | 7 | [options] 8 | show_rtd = True 9 | 10 | white = #ffffff 11 | almost_white = #f8f8f8 12 | barely_white = #f2f2f2 13 | dirty_white = #eeeeee 14 | almost_dirty_white = #e6e6e6 15 | dirtier_white = #dddddd 16 | lighter_gray = #cccccc 17 | gray_a = #aaaaaa 18 | gray_9 = #999999 19 | light_gray = #888888 20 | gray_7 = #777777 21 | gray = #666666 22 | dark_gray = #444444 23 | gray_2 = #222222 24 | black = #111111 25 | light_color = #e8ecef 26 | light_medium_color = #DDEAF0 27 | medium_color = #8ca1af 28 | medium_color_link = #86989b 29 | medium_color_link_hover = #a6b8bb 30 | dark_color = #465158 31 | 32 | h1 = #000000 33 | h2 = #465158 34 | h3 = #6c818f 35 | 36 | link_color = #444444 37 | link_color_decoration = #CCCCCC 38 | 39 | medium_color_hover = #697983 40 | green_highlight = #8ecc4c 41 | 42 | 43 | positive_dark = #609060 44 | positive_medium = #70a070 45 | positive_light = #e9ffe9 46 | 47 | negative_dark = #900000 48 | negative_medium = #b04040 49 | negative_light = #ffe9e9 50 | negative_text = #c60f0f 51 | 52 | ruler = #abc 53 | 54 | viewcode_bg = #f4debf 55 | viewcode_border = #ac9 56 | 57 | highlight = #ffe080 58 | 59 | code_background = #eeeeee 60 | 61 | background = #465158 62 | background_link = #ffffff 63 | background_link_half = #ffffff 64 | background_text = #eeeeee 65 | background_text_link = #86989b 66 | -------------------------------------------------------------------------------- /docs/.themes/armstrong/theme.conf.orig: -------------------------------------------------------------------------------- 1 | [theme] 2 | inherit = default 3 | stylesheet = rtd.css 4 | pygment_style = default 5 | show_sphinx = False 6 | 7 | [options] 8 | show_rtd = True 9 | 10 | white = #ffffff 11 | almost_white = #f8f8f8 12 | barely_white = #f2f2f2 13 | dirty_white = #eeeeee 14 | almost_dirty_white = #e6e6e6 15 | dirtier_white = #DAC6AF 16 | lighter_gray = #cccccc 17 | gray_a = #aaaaaa 18 | gray_9 = #999999 19 | light_gray = #888888 20 | gray_7 = #777777 21 | gray = #666666 22 | dark_gray = #444444 23 | gray_2 = #222222 24 | black = #111111 25 | light_color = #EDE4D8 26 | light_medium_color = #DDEAF0 27 | medium_color = #8ca1af 28 | medium_color_link = #634320 29 | medium_color_link_hover = #261a0c 30 | dark_color = rgba(160, 109, 52, 1.0) 31 | 32 | h1 = #1f3744 33 | h2 = #335C72 34 | h3 = #638fa6 35 | 36 | link_color = #335C72 37 | link_color_decoration = #99AEB9 38 | 39 | medium_color_hover = rgba(255, 255, 255, 0.25) 40 | medium_color = rgba(255, 255, 255, 0.5) 41 | green_highlight = #8ecc4c 42 | 43 | 44 | positive_dark = rgba(51, 77, 0, 1.0) 45 | positive_medium = rgba(102, 153, 0, 1.0) 46 | positive_light = rgba(102, 153, 0, 0.1) 47 | 48 | negative_dark = rgba(51, 13, 0, 1.0) 49 | negative_medium = rgba(204, 51, 0, 1.0) 50 | negative_light = rgba(204, 51, 0, 0.1) 51 | negative_text = #c60f0f 52 | 53 | ruler = #abc 54 | 55 | viewcode_bg = #f4debf 56 | viewcode_border = #ac9 57 | 58 | highlight = #ffe080 59 | 60 | code_background = rgba(0, 0, 0, 0.075) 61 | 62 | background = rgba(135, 57, 34, 1.0) 63 | background_link = rgba(212, 195, 172, 1.0) 64 | background_link_half = rgba(212, 195, 172, 0.5) 65 | background_text = rgba(212, 195, 172, 1.0) 66 | background_text_link = rgba(171, 138, 93, 1.0) 67 | -------------------------------------------------------------------------------- /docs/_static/img/add-picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/add-picture.png -------------------------------------------------------------------------------- /docs/_static/img/add-shape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/add-shape.png -------------------------------------------------------------------------------- /docs/_static/img/add-table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/add-table.png -------------------------------------------------------------------------------- /docs/_static/img/add-textbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/add-textbox.png -------------------------------------------------------------------------------- /docs/_static/img/bullet-slide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/bullet-slide.png -------------------------------------------------------------------------------- /docs/_static/img/chart-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/chart-01.png -------------------------------------------------------------------------------- /docs/_static/img/chart-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/chart-02.png -------------------------------------------------------------------------------- /docs/_static/img/chart-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/chart-03.png -------------------------------------------------------------------------------- /docs/_static/img/chart-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/chart-04.png -------------------------------------------------------------------------------- /docs/_static/img/chart-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/chart-05.png -------------------------------------------------------------------------------- /docs/_static/img/chart-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/chart-06.png -------------------------------------------------------------------------------- /docs/_static/img/chart-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/chart-07.png -------------------------------------------------------------------------------- /docs/_static/img/chart-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/chart-08.png -------------------------------------------------------------------------------- /docs/_static/img/chart-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/chart-09.png -------------------------------------------------------------------------------- /docs/_static/img/freeform-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/freeform-01.png -------------------------------------------------------------------------------- /docs/_static/img/freeform-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/freeform-02.png -------------------------------------------------------------------------------- /docs/_static/img/freeform-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/freeform-03.png -------------------------------------------------------------------------------- /docs/_static/img/hello-world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/hello-world.png -------------------------------------------------------------------------------- /docs/_static/img/table-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/table-01.png -------------------------------------------------------------------------------- /docs/_static/img/table-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/table-02.png -------------------------------------------------------------------------------- /docs/_static/img/table-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/table-03.png -------------------------------------------------------------------------------- /docs/_static/img/table-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/table-04.png -------------------------------------------------------------------------------- /docs/_static/img/table-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/table-05.png -------------------------------------------------------------------------------- /docs/_static/img/table-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/table-06.png -------------------------------------------------------------------------------- /docs/_static/img/table-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scanny/python-pptx/278b47b1dedd5b46ee84c286e77cdfb0bf4594be/docs/_static/img/table-07.png -------------------------------------------------------------------------------- /docs/_templates/sidebarlinks.html: -------------------------------------------------------------------------------- 1 |

Useful Links

2 | 7 | -------------------------------------------------------------------------------- /docs/api/action.rst: -------------------------------------------------------------------------------- 1 | .. _action_api: 2 | 3 | Click Action-related Objects 4 | ============================ 5 | 6 | The following classes represent click and hover mouse actions, typically 7 | a hyperlink. Other actions such as navigating to another slide in the 8 | presentation or running a macro are also possible. 9 | 10 | 11 | |ActionSetting| objects 12 | ----------------------- 13 | 14 | .. autoclass:: pptx.action.ActionSetting() 15 | :members: 16 | :inherited-members: 17 | :undoc-members: 18 | 19 | 20 | |Hyperlink| objects 21 | ----------------------- 22 | 23 | .. autoclass:: pptx.action.Hyperlink() 24 | :members: 25 | :inherited-members: 26 | :undoc-members: 27 | -------------------------------------------------------------------------------- /docs/api/dml.rst: -------------------------------------------------------------------------------- 1 | .. _dml_api: 2 | 3 | DrawingML objects 4 | ================= 5 | 6 | Low-level drawing elements like fill and color that appear repeatedly in 7 | various aspects of shapes. 8 | 9 | 10 | |ChartFormat| objects 11 | --------------------- 12 | 13 | .. autoclass:: pptx.dml.chtfmt.ChartFormat 14 | :members: 15 | 16 | 17 | |FillFormat| objects 18 | -------------------- 19 | 20 | .. autoclass:: pptx.dml.fill.FillFormat 21 | :members: 22 | :exclude-members: from_fill_parent 23 | :undoc-members: 24 | 25 | 26 | |LineFormat| objects 27 | -------------------- 28 | 29 | .. autoclass:: pptx.dml.line.LineFormat 30 | :members: 31 | :undoc-members: 32 | 33 | 34 | |ColorFormat| objects 35 | --------------------- 36 | 37 | .. autoclass:: pptx.dml.color.ColorFormat 38 | :members: brightness, rgb, theme_color, type 39 | :undoc-members: 40 | 41 | 42 | |RGBColor| objects 43 | ------------------ 44 | 45 | .. autoclass:: pptx.dml.color.RGBColor 46 | :members: from_string 47 | :undoc-members: 48 | 49 | 50 | |ShadowFormat| objects 51 | ---------------------- 52 | 53 | .. autoclass:: pptx.dml.effect.ShadowFormat 54 | :members: 55 | :undoc-members: 56 | -------------------------------------------------------------------------------- /docs/api/enum/MsoAutoSize.rst: -------------------------------------------------------------------------------- 1 | .. _MsoAutoSize: 2 | 3 | ``MSO_AUTO_SIZE`` 4 | ================= 5 | 6 | Determines the type of automatic sizing allowed. 7 | 8 | The following names can be used to specify the automatic sizing behavior 9 | used to fit a shape's text within the shape bounding box, for example:: 10 | 11 | from pptx.enum.text import MSO_AUTO_SIZE 12 | 13 | shape.text_frame.auto_size = MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE 14 | 15 | The word-wrap setting of the text frame interacts with the auto-size setting 16 | to determine the specific auto-sizing behavior. 17 | 18 | Note that ``TextFrame.auto_size`` can also be set to |None|, which removes 19 | the auto size setting altogether. This causes the setting to be inherited, 20 | either from the layout placeholder, in the case of a placeholder shape, or 21 | from the theme. 22 | 23 | ---- 24 | 25 | NONE 26 | No automatic sizing of the shape or text will be done. Text can freely 27 | extend beyond the horizontal and vertical edges of the shape bounding box. 28 | 29 | SHAPE_TO_FIT_TEXT 30 | The shape height and possibly width are adjusted to fit the text. Note 31 | this setting interacts with the TextFrame.word_wrap property setting. If 32 | word wrap is turned on, only the height of the shape will be adjusted; 33 | soft line breaks will be used to fit the text horizontally. 34 | 35 | TEXT_TO_FIT_SHAPE 36 | The font size is reduced as necessary to fit the text within the shape. 37 | 38 | MIXED 39 | Return value only; indicates a combination of automatic sizing schemes are 40 | used. 41 | -------------------------------------------------------------------------------- /docs/api/enum/MsoColorType.rst: -------------------------------------------------------------------------------- 1 | .. _MsoColorType: 2 | 3 | ``MSO_COLOR_TYPE`` 4 | ================== 5 | 6 | Specifies the color specification scheme 7 | 8 | Example:: 9 | 10 | from pptx.enum.dml import MSO_COLOR_TYPE 11 | 12 | assert shape.fill.fore_color.type == MSO_COLOR_TYPE.SCHEME 13 | 14 | ---- 15 | 16 | RGB 17 | Color is specified by an |RGBColor| value 18 | 19 | SCHEME 20 | Color is one of the preset theme colors 21 | 22 | HSL 23 | Color is specified using Hue, Saturation, and Luminosity values 24 | 25 | PRESET 26 | Color is specified using a named built-in color 27 | 28 | SCRGB 29 | Color is an scRGB color, a wide color gamut RGB color space 30 | 31 | SYSTEM 32 | Color is one specified by the operating system, such as the window 33 | background color. 34 | -------------------------------------------------------------------------------- /docs/api/enum/MsoConnectorType.rst: -------------------------------------------------------------------------------- 1 | .. _MsoConnectorType: 2 | 3 | ``MSO_CONNECTOR_TYPE`` 4 | ====================== 5 | 6 | Specifies a type of connector. 7 | 8 | Alias: ``MSO_CONNECTOR`` 9 | 10 | Example:: 11 | 12 | from pptx.enum.shapes import MSO_CONNECTOR 13 | from pptx.util import Cm 14 | 15 | shapes = prs.slides[0].shapes 16 | connector = shapes.add_connector( 17 | MSO_CONNECTOR.STRAIGHT, Cm(2), Cm(2), Cm(10), Cm(10) 18 | ) 19 | assert connector.left.cm == 2 20 | 21 | ---- 22 | 23 | CURVE 24 | Curved connector. 25 | 26 | ELBOW 27 | Elbow connector. 28 | 29 | STRAIGHT 30 | Straight line connector. 31 | 32 | MIXED 33 | Return value only; indicates a combination of other states. 34 | -------------------------------------------------------------------------------- /docs/api/enum/MsoFillType.rst: -------------------------------------------------------------------------------- 1 | .. _MsoFillType: 2 | 3 | ``MSO_FILL_TYPE`` 4 | ================= 5 | 6 | Specifies the type of bitmap used for the fill of a shape. 7 | 8 | Alias: ``MSO_FILL`` 9 | 10 | Example:: 11 | 12 | from pptx.enum.dml import MSO_FILL 13 | 14 | assert shape.fill.type == MSO_FILL.SOLID 15 | 16 | ---- 17 | 18 | BACKGROUND 19 | The shape is transparent, such that whatever is behind the shape shows 20 | through. Often this is the slide background, but if a visible shape is 21 | behind, that will show through. 22 | 23 | GRADIENT 24 | Shape is filled with a gradient 25 | 26 | GROUP 27 | Shape is part of a group and should inherit the fill properties of the 28 | group. 29 | 30 | PATTERNED 31 | Shape is filled with a pattern 32 | 33 | PICTURE 34 | Shape is filled with a bitmapped image 35 | 36 | SOLID 37 | Shape is filled with a solid color 38 | 39 | TEXTURED 40 | Shape is filled with a texture 41 | -------------------------------------------------------------------------------- /docs/api/enum/MsoLineDashStyle.rst: -------------------------------------------------------------------------------- 1 | .. _MsoLineDashStyle: 2 | 3 | ``MSO_LINE_DASH_STYLE`` 4 | ======================= 5 | 6 | Specifies the dash style for a line. 7 | 8 | Alias: ``MSO_LINE`` 9 | 10 | Example:: 11 | 12 | from pptx.enum.dml import MSO_LINE 13 | 14 | shape.line.dash_style = MSO_LINE.DASH_DOT_DOT 15 | 16 | ---- 17 | 18 | DASH 19 | Line consists of dashes only. 20 | 21 | DASH_DOT 22 | Line is a dash-dot pattern. 23 | 24 | DASH_DOT_DOT 25 | Line is a dash-dot-dot pattern. 26 | 27 | LONG_DASH 28 | Line consists of long dashes. 29 | 30 | LONG_DASH_DOT 31 | Line is a long dash-dot pattern. 32 | 33 | ROUND_DOT 34 | Line is made up of round dots. 35 | 36 | SOLID 37 | Line is solid. 38 | 39 | SQUARE_DOT 40 | Line is made up of square dots. 41 | 42 | DASH_STYLE_MIXED 43 | Not supported. 44 | -------------------------------------------------------------------------------- /docs/api/enum/MsoShapeType.rst: -------------------------------------------------------------------------------- 1 | .. _MsoShapeType: 2 | 3 | ``MSO_SHAPE_TYPE`` 4 | ================== 5 | 6 | Specifies the type of a shape 7 | 8 | Alias: ``MSO`` 9 | 10 | Example:: 11 | 12 | from pptx.enum.shapes import MSO_SHAPE_TYPE 13 | 14 | assert shape.type == MSO_SHAPE_TYPE.PICTURE 15 | 16 | ---- 17 | 18 | AUTO_SHAPE 19 | AutoShape 20 | 21 | CALLOUT 22 | Callout shape 23 | 24 | CANVAS 25 | Drawing canvas 26 | 27 | CHART 28 | Chart, e.g. pie chart, bar chart 29 | 30 | COMMENT 31 | Comment 32 | 33 | DIAGRAM 34 | Diagram 35 | 36 | EMBEDDED_OLE_OBJECT 37 | Embedded OLE object 38 | 39 | FORM_CONTROL 40 | Form control 41 | 42 | FREEFORM 43 | Freeform 44 | 45 | GROUP 46 | Group shape 47 | 48 | IGX_GRAPHIC 49 | SmartArt graphic 50 | 51 | INK 52 | Ink 53 | 54 | INK_COMMENT 55 | Ink Comment 56 | 57 | LINE 58 | Line 59 | 60 | LINKED_OLE_OBJECT 61 | Linked OLE object 62 | 63 | LINKED_PICTURE 64 | Linked picture 65 | 66 | MEDIA 67 | Media 68 | 69 | OLE_CONTROL_OBJECT 70 | OLE control object 71 | 72 | PICTURE 73 | Picture 74 | 75 | PLACEHOLDER 76 | Placeholder 77 | 78 | SCRIPT_ANCHOR 79 | Script anchor 80 | 81 | TABLE 82 | Table 83 | 84 | TEXT_BOX 85 | Text box 86 | 87 | TEXT_EFFECT 88 | Text effect 89 | 90 | WEB_VIDEO 91 | Web video 92 | 93 | MIXED 94 | Mixed shape types 95 | -------------------------------------------------------------------------------- /docs/api/enum/MsoTextUnderlineType.rst: -------------------------------------------------------------------------------- 1 | .. _MsoTextUnderlineType: 2 | 3 | ``MSO_TEXT_UNDERLINE_TYPE`` 4 | =========================== 5 | 6 | Indicates the type of underline for text. Used with :attr:`.Font.underline` 7 | to specify the style of text underlining. 8 | 9 | Alias: ``MSO_UNDERLINE`` 10 | 11 | Example:: 12 | 13 | from pptx.enum.text import MSO_UNDERLINE 14 | 15 | run.font.underline = MSO_UNDERLINE.DOUBLE_LINE 16 | 17 | ---- 18 | 19 | NONE 20 | Specifies no underline. 21 | 22 | DASH_HEAVY_LINE 23 | Specifies a dash underline. 24 | 25 | DASH_LINE 26 | Specifies a dash line underline. 27 | 28 | DASH_LONG_HEAVY_LINE 29 | Specifies a long heavy line underline. 30 | 31 | DASH_LONG_LINE 32 | Specifies a dashed long line underline. 33 | 34 | DOT_DASH_HEAVY_LINE 35 | Specifies a dot dash heavy line underline. 36 | 37 | DOT_DASH_LINE 38 | Specifies a dot dash line underline. 39 | 40 | DOT_DOT_DASH_HEAVY_LINE 41 | Specifies a dot dot dash heavy line underline. 42 | 43 | DOT_DOT_DASH_LINE 44 | Specifies a dot dot dash line underline. 45 | 46 | DOTTED_HEAVY_LINE 47 | Specifies a dotted heavy line underline. 48 | 49 | DOTTED_LINE 50 | Specifies a dotted line underline. 51 | 52 | DOUBLE_LINE 53 | Specifies a double line underline. 54 | 55 | HEAVY_LINE 56 | Specifies a heavy line underline. 57 | 58 | SINGLE_LINE 59 | Specifies a single line underline. 60 | 61 | WAVY_DOUBLE_LINE 62 | Specifies a wavy double line underline. 63 | 64 | WAVY_HEAVY_LINE 65 | Specifies a wavy heavy line underline. 66 | 67 | WAVY_LINE 68 | Specifies a wavy line underline. 69 | 70 | WORDS 71 | Specifies underlining words. 72 | 73 | MIXED 74 | Specifies a mixed of underline types. 75 | -------------------------------------------------------------------------------- /docs/api/enum/MsoThemeColorIndex.rst: -------------------------------------------------------------------------------- 1 | .. _MsoThemeColorIndex: 2 | 3 | ``MSO_THEME_COLOR_INDEX`` 4 | ========================= 5 | 6 | Indicates the Office theme color, one of those shown in the color gallery on 7 | the formatting ribbon. 8 | 9 | Alias: ``MSO_THEME_COLOR`` 10 | 11 | Example:: 12 | 13 | from pptx.enum.dml import MSO_THEME_COLOR 14 | 15 | shape.fill.solid() 16 | shape.fill.fore_color.theme_color == MSO_THEME_COLOR.ACCENT_1 17 | 18 | ---- 19 | 20 | NOT_THEME_COLOR 21 | Indicates the color is not a theme color. 22 | 23 | ACCENT_1 24 | Specifies the Accent 1 theme color. 25 | 26 | ACCENT_2 27 | Specifies the Accent 2 theme color. 28 | 29 | ACCENT_3 30 | Specifies the Accent 3 theme color. 31 | 32 | ACCENT_4 33 | Specifies the Accent 4 theme color. 34 | 35 | ACCENT_5 36 | Specifies the Accent 5 theme color. 37 | 38 | ACCENT_6 39 | Specifies the Accent 6 theme color. 40 | 41 | BACKGROUND_1 42 | Specifies the Background 1 theme color. 43 | 44 | BACKGROUND_2 45 | Specifies the Background 2 theme color. 46 | 47 | DARK_1 48 | Specifies the Dark 1 theme color. 49 | 50 | DARK_2 51 | Specifies the Dark 2 theme color. 52 | 53 | FOLLOWED_HYPERLINK 54 | Specifies the theme color for a clicked hyperlink. 55 | 56 | HYPERLINK 57 | Specifies the theme color for a hyperlink. 58 | 59 | LIGHT_1 60 | Specifies the Light 1 theme color. 61 | 62 | LIGHT_2 63 | Specifies the Light 2 theme color. 64 | 65 | TEXT_1 66 | Specifies the Text 1 theme color. 67 | 68 | TEXT_2 69 | Specifies the Text 2 theme color. 70 | 71 | MIXED 72 | Indicates multiple theme colors are used, such as in a group shape. 73 | -------------------------------------------------------------------------------- /docs/api/enum/MsoVerticalAnchor.rst: -------------------------------------------------------------------------------- 1 | .. _MsoVerticalAnchor: 2 | 3 | ``MSO_VERTICAL_ANCHOR`` 4 | ======================= 5 | 6 | Specifies the vertical alignment of text in a text frame. Used with the 7 | ``.vertical_anchor`` property of the |TextFrame| object. Note that the 8 | ``vertical_anchor`` property can also have the value None, indicating 9 | there is no directly specified vertical anchor setting and its effective 10 | value is inherited from its placeholder if it has one or from the theme. 11 | None may also be assigned to remove an explicitly specified vertical 12 | anchor setting. 13 | 14 | Alias: ``MSO_ANCHOR`` 15 | 16 | Example:: 17 | 18 | from pptx.enum.text import MSO_ANCHOR 19 | 20 | cell = table.cell(row_idx=2, col_idx=3) 21 | cell.vertical_anchor = MSO_ANCHOR.BOTTOM 22 | 23 | ---- 24 | 25 | TOP 26 | Aligns text to top of text frame and inherits its value from its layout 27 | placeholder or theme. 28 | 29 | MIDDLE 30 | Centers text vertically 31 | 32 | BOTTOM 33 | Aligns text to bottom of text frame 34 | 35 | MIXED 36 | Return value only; indicates a combination of the other states. 37 | -------------------------------------------------------------------------------- /docs/api/enum/PpActionType.rst: -------------------------------------------------------------------------------- 1 | .. _PpActionType: 2 | 3 | ``PP_ACTION_TYPE`` 4 | ================== 5 | 6 | Specifies the type of a mouse action (click or hover action). 7 | 8 | Alias: ``PP_ACTION`` 9 | 10 | Example:: 11 | 12 | from pptx.enum.action import PP_ACTION 13 | 14 | assert shape.click_action.action == PP_ACTION.HYPERLINK 15 | 16 | ---- 17 | 18 | END_SHOW 19 | Slide show ends. 20 | 21 | FIRST_SLIDE 22 | Returns to the first slide. 23 | 24 | HYPERLINK 25 | Hyperlink. 26 | 27 | LAST_SLIDE 28 | Moves to the last slide. 29 | 30 | LAST_SLIDE_VIEWED 31 | Moves to the last slide viewed. 32 | 33 | NAMED_SLIDE 34 | Moves to slide specified by slide number. 35 | 36 | NAMED_SLIDE_SHOW 37 | Runs the slideshow. 38 | 39 | NEXT_SLIDE 40 | Moves to the next slide. 41 | 42 | NONE 43 | No action is performed. 44 | 45 | OPEN_FILE 46 | Opens the specified file. 47 | 48 | OLE_VERB 49 | OLE Verb. 50 | 51 | PLAY 52 | Begins the slideshow. 53 | 54 | PREVIOUS_SLIDE 55 | Moves to the previous slide. 56 | 57 | RUN_MACRO 58 | Runs a macro. 59 | 60 | RUN_PROGRAM 61 | Runs a program. 62 | -------------------------------------------------------------------------------- /docs/api/enum/PpMediaType.rst: -------------------------------------------------------------------------------- 1 | .. _PpMediaType: 2 | 3 | ``PP_MEDIA_TYPE`` 4 | ================= 5 | 6 | Indicates the OLE media type. 7 | 8 | Example:: 9 | 10 | from pptx.enum.shapes import PP_MEDIA_TYPE 11 | 12 | movie = slide.shapes[0] 13 | assert movie.media_type == PP_MEDIA_TYPE.MOVIE 14 | 15 | ---- 16 | 17 | MOVIE 18 | Video media such as MP4. 19 | 20 | OTHER 21 | Other media types 22 | 23 | SOUND 24 | Audio media such as MP3. 25 | 26 | MIXED 27 | Return value only; indicates multiple media types. 28 | -------------------------------------------------------------------------------- /docs/api/enum/PpParagraphAlignment.rst: -------------------------------------------------------------------------------- 1 | .. _PpParagraphAlignment: 2 | 3 | ``PP_PARAGRAPH_ALIGNMENT`` 4 | ========================== 5 | 6 | Specifies the horizontal alignment for one or more paragraphs. 7 | 8 | Alias: ``PP_ALIGN`` 9 | 10 | Example:: 11 | 12 | from pptx.enum.text import PP_ALIGN 13 | 14 | shape.paragraphs[0].alignment = PP_ALIGN.CENTER 15 | 16 | ---- 17 | 18 | CENTER 19 | Center align 20 | 21 | DISTRIBUTE 22 | Evenly distributes e.g. Japanese characters from left to right within a 23 | line 24 | 25 | JUSTIFY 26 | Justified, i.e. each line both begins and ends at the margin with spacing 27 | between words adjusted such that the line exactly fills the width of the 28 | paragraph. 29 | 30 | JUSTIFY_LOW 31 | Justify using a small amount of space between words. 32 | 33 | LEFT 34 | Left aligned 35 | 36 | RIGHT 37 | Right aligned 38 | 39 | THAI_DISTRIBUTE 40 | Thai distributed 41 | 42 | MIXED 43 | Return value only; indicates multiple paragraph alignments are present in 44 | a set of paragraphs. 45 | -------------------------------------------------------------------------------- /docs/api/enum/PpPlaceholderType.rst: -------------------------------------------------------------------------------- 1 | .. _PpPlaceholderType: 2 | 3 | ``PP_PLACEHOLDER_TYPE`` 4 | ======================= 5 | 6 | Specifies one of the 18 distinct types of placeholder. 7 | 8 | Alias: ``PP_PLACEHOLDER`` 9 | 10 | Example:: 11 | 12 | from pptx.enum.shapes import PP_PLACEHOLDER 13 | 14 | placeholder = slide.placeholders[0] 15 | assert placeholder.type == PP_PLACEHOLDER.TITLE 16 | 17 | ---- 18 | 19 | BITMAP 20 | Bitmap 21 | 22 | BODY 23 | Body 24 | 25 | CENTER_TITLE 26 | Center Title 27 | 28 | CHART 29 | Chart 30 | 31 | DATE 32 | Date 33 | 34 | FOOTER 35 | Footer 36 | 37 | HEADER 38 | Header 39 | 40 | MEDIA_CLIP 41 | Media Clip 42 | 43 | OBJECT 44 | Object 45 | 46 | ORG_CHART 47 | Organization Chart 48 | 49 | PICTURE 50 | Picture 51 | 52 | SLIDE_NUMBER 53 | Slide Number 54 | 55 | SUBTITLE 56 | Subtitle 57 | 58 | TABLE 59 | Table 60 | 61 | TITLE 62 | Title 63 | 64 | VERTICAL_BODY 65 | Vertical Body 66 | 67 | VERTICAL_OBJECT 68 | Vertical Object 69 | 70 | VERTICAL_TITLE 71 | Vertical Title 72 | 73 | MIXED 74 | Return value only; multiple placeholders of differing types. 75 | -------------------------------------------------------------------------------- /docs/api/enum/XlAxisCrosses.rst: -------------------------------------------------------------------------------- 1 | .. _XlAxisCrosses: 2 | 3 | ``XL_AXIS_CROSSES`` 4 | =================== 5 | 6 | Specifies the point on the specified axis where the other axis crosses. 7 | 8 | Example:: 9 | 10 | from pptx.enum.chart import XL_AXIS_CROSSES 11 | 12 | value_axis.crosses = XL_AXIS_CROSSES.MAXIMUM 13 | 14 | ---- 15 | 16 | AUTOMATIC 17 | The axis crossing point is set automatically, often at zero. 18 | 19 | CUSTOM 20 | The `.crosses_at` property specifies the axis crossing point. 21 | 22 | MAXIMUM 23 | The axis crosses at the maximum value. 24 | 25 | MINIMUM 26 | The axis crosses at the minimum value. 27 | -------------------------------------------------------------------------------- /docs/api/enum/XlCategoryType.rst: -------------------------------------------------------------------------------- 1 | .. _XlCategoryType: 2 | 3 | ``XL_CATEGORY_TYPE`` 4 | ==================== 5 | 6 | Specifies the type of the category axis. 7 | 8 | Example:: 9 | 10 | from pptx.enum.chart import XL_CATEGORY_TYPE 11 | 12 | date_axis = chart.category_axis 13 | assert date_axis.category_type == XL_CATEGORY_TYPE.TIME_SCALE 14 | 15 | ---- 16 | 17 | AUTOMATIC_SCALE 18 | The application controls the axis type. 19 | 20 | CATEGORY_SCALE 21 | Axis groups data by an arbitrary set of categories 22 | 23 | TIME_SCALE 24 | Axis groups data on a time scale of days, months, or years. 25 | -------------------------------------------------------------------------------- /docs/api/enum/XlDataLabelPosition.rst: -------------------------------------------------------------------------------- 1 | .. _XlDataLabelPosition: 2 | 3 | ``XL_DATA_LABEL_POSITION`` 4 | ========================== 5 | 6 | Specifies where the data label is positioned. 7 | 8 | Example:: 9 | 10 | from pptx.enum.chart import XL_LABEL_POSITION 11 | 12 | data_labels = chart.plots[0].data_labels 13 | data_labels.position = XL_LABEL_POSITION.OUTSIDE_END 14 | 15 | ---- 16 | 17 | ABOVE 18 | The data label is positioned above the data point. 19 | 20 | BELOW 21 | The data label is positioned below the data point. 22 | 23 | BEST_FIT 24 | Word sets the position of the data label. 25 | 26 | CENTER 27 | The data label is centered on the data point or inside a bar or a pie 28 | slice. 29 | 30 | INSIDE_BASE 31 | The data label is positioned inside the data point at the bottom edge. 32 | 33 | INSIDE_END 34 | The data label is positioned inside the data point at the top edge. 35 | 36 | LEFT 37 | The data label is positioned to the left of the data point. 38 | 39 | MIXED 40 | Data labels are in multiple positions. 41 | 42 | OUTSIDE_END 43 | The data label is positioned outside the data point at the top edge. 44 | 45 | RIGHT 46 | The data label is positioned to the right of the data point. 47 | -------------------------------------------------------------------------------- /docs/api/enum/XlLegendPosition.rst: -------------------------------------------------------------------------------- 1 | .. _XlLegendPosition: 2 | 3 | ``XL_LEGEND_POSITION`` 4 | ====================== 5 | 6 | Specifies the position of the legend on a chart. 7 | 8 | Example:: 9 | 10 | from pptx.enum.chart import XL_LEGEND_POSITION 11 | 12 | chart.has_legend = True 13 | chart.legend.position = XL_LEGEND_POSITION.BOTTOM 14 | 15 | ---- 16 | 17 | BOTTOM 18 | Below the chart. 19 | 20 | CORNER 21 | In the upper-right corner of the chart border. 22 | 23 | CUSTOM 24 | A custom position. 25 | 26 | LEFT 27 | Left of the chart. 28 | 29 | RIGHT 30 | Right of the chart. 31 | 32 | TOP 33 | Above the chart. 34 | -------------------------------------------------------------------------------- /docs/api/enum/XlMarkerStyle.rst: -------------------------------------------------------------------------------- 1 | .. _XlMarkerStyle: 2 | 3 | ``XL_MARKER_STYLE`` 4 | =================== 5 | 6 | Specifies the marker style for a point or series in a line chart, scatter 7 | chart, or radar chart. 8 | 9 | Example:: 10 | 11 | from pptx.enum.chart import XL_MARKER_STYLE 12 | 13 | series.marker.style = XL_MARKER_STYLE.CIRCLE 14 | 15 | ---- 16 | 17 | AUTOMATIC 18 | Automatic markers 19 | 20 | CIRCLE 21 | Circular markers 22 | 23 | DASH 24 | Long bar markers 25 | 26 | DIAMOND 27 | Diamond-shaped markers 28 | 29 | DOT 30 | Short bar markers 31 | 32 | NONE 33 | No markers 34 | 35 | PICTURE 36 | Picture markers 37 | 38 | PLUS 39 | Square markers with a plus sign 40 | 41 | SQUARE 42 | Square markers 43 | 44 | STAR 45 | Square markers with an asterisk 46 | 47 | TRIANGLE 48 | Triangular markers 49 | 50 | X 51 | Square markers with an X 52 | -------------------------------------------------------------------------------- /docs/api/enum/XlTickLabelPosition.rst: -------------------------------------------------------------------------------- 1 | .. _XlTickLabelPosition: 2 | 3 | ``XL_TICK_LABEL_POSITION`` 4 | ========================== 5 | 6 | Specifies the position of tick-mark labels on a chart axis. 7 | 8 | Example:: 9 | 10 | from pptx.enum.chart import XL_TICK_LABEL_POSITION 11 | 12 | category_axis = chart.category_axis 13 | category_axis.tick_label_position = XL_TICK_LABEL_POSITION.LOW 14 | 15 | ---- 16 | 17 | HIGH 18 | Top or right side of the chart. 19 | 20 | LOW 21 | Bottom or left side of the chart. 22 | 23 | NEXT_TO_AXIS 24 | Next to axis (where axis is not at either side of the chart). 25 | 26 | NONE 27 | No tick labels. 28 | -------------------------------------------------------------------------------- /docs/api/enum/XlTickMark.rst: -------------------------------------------------------------------------------- 1 | .. _XlTickMark: 2 | 3 | ``XL_TICK_MARK`` 4 | ================ 5 | 6 | Specifies a type of axis tick for a chart. 7 | 8 | Example:: 9 | 10 | from pptx.enum.chart import XL_TICK_MARK 11 | 12 | chart.value_axis.minor_tick_mark = XL_TICK_MARK.INSIDE 13 | 14 | ---- 15 | 16 | CROSS 17 | Tick mark crosses the axis 18 | 19 | INSIDE 20 | Tick mark appears inside the axis 21 | 22 | NONE 23 | No tick mark 24 | 25 | OUTSIDE 26 | Tick mark appears outside the axis 27 | -------------------------------------------------------------------------------- /docs/api/enum/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Enumerations 3 | ============ 4 | 5 | Documentation for the various enumerations used for |pp| property settings 6 | can be found here: 7 | 8 | .. toctree:: 9 | :titlesonly: 10 | 11 | MsoAutoShapeType 12 | MsoAutoSize 13 | MsoColorType 14 | MsoConnectorType 15 | MsoFillType 16 | MsoLanguageId 17 | MsoLineDashStyle 18 | MsoPatternType 19 | MsoShapeType 20 | MsoTextUnderlineType 21 | MsoThemeColorIndex 22 | MsoVerticalAnchor 23 | 24 | PpActionType 25 | PpMediaType 26 | PpParagraphAlignment 27 | PpPlaceholderType 28 | 29 | XlAxisCrosses 30 | XlCategoryType 31 | XlChartType 32 | XlDataLabelPosition 33 | XlLegendPosition 34 | XlMarkerStyle 35 | XlTickLabelPosition 36 | XlTickMark 37 | 38 | ExcelNumFormat 39 | -------------------------------------------------------------------------------- /docs/api/exc.rst: -------------------------------------------------------------------------------- 1 | .. _exceptions: 2 | 3 | Exceptions 4 | ========== 5 | 6 | .. automodule:: pptx.exc 7 | :members: 8 | :member-order: bysource 9 | :undoc-members: 10 | -------------------------------------------------------------------------------- /docs/api/image.rst: -------------------------------------------------------------------------------- 1 | .. _image_api: 2 | 3 | Image 4 | ===== 5 | 6 | An image depicted in a |Picture| shape can be accessed using its 7 | :attr:`~.Picture.image` property. The |Image| object provides access to 8 | detailed properties of the image itself, including the bytes of the image 9 | file itself. 10 | 11 | 12 | |Image| objects 13 | --------------- 14 | 15 | The |Image| object is encountered as the :attr:`~Picture.image` property of 16 | |Picture|. 17 | 18 | .. autoclass:: pptx.parts.image.Image() 19 | :members: 20 | :exclude-members: from_blob, from_file 21 | -------------------------------------------------------------------------------- /docs/api/table.rst: -------------------------------------------------------------------------------- 1 | .. _table_api: 2 | 3 | Table-related objects 4 | ===================== 5 | 6 | 7 | .. currentmodule:: pptx.table 8 | 9 | 10 | |Table| objects 11 | ---------------- 12 | 13 | A |Table| object is added to a slide using the 14 | :meth:`~.SlideShapes.add_table` method on |SlideShapes|. 15 | 16 | .. autoclass:: Table() 17 | :members: 18 | :inherited-members: 19 | :exclude-members: 20 | notify_height_changed, notify_width_changed, part 21 | :undoc-members: 22 | 23 | 24 | |_Column| objects 25 | ----------------- 26 | 27 | .. autoclass:: _Column() 28 | :members: 29 | :member-order: bysource 30 | :undoc-members: 31 | 32 | 33 | |_Row| objects 34 | -------------- 35 | 36 | .. autoclass:: _Row() 37 | :members: 38 | :member-order: bysource 39 | :undoc-members: 40 | 41 | 42 | |_Cell| objects 43 | --------------- 44 | 45 | A |_Cell| object represents a single table cell at a particular row/column 46 | location in the table. |_Cell| objects are not constructed directly. A 47 | reference to a |_Cell| object is obtained using the :meth:`Table.cell` method, 48 | specifying the cell's row/column location. A cell object can also be obtained 49 | using the :attr:`_Row.cells` collection. 50 | 51 | .. autoclass:: _Cell 52 | :members: 53 | :member-order: bysource 54 | :undoc-members: 55 | -------------------------------------------------------------------------------- /docs/api/text.rst: -------------------------------------------------------------------------------- 1 | .. _text_api: 2 | 3 | Text-related objects 4 | ==================== 5 | 6 | 7 | .. currentmodule:: pptx.text.text 8 | 9 | 10 | |TextFrame| objects 11 | -------------------- 12 | 13 | .. autoclass:: TextFrame() 14 | :members: 15 | :member-order: bysource 16 | :undoc-members: 17 | 18 | 19 | |Font| objects 20 | -------------- 21 | 22 | The |Font| object is encountered as a property of |_Run|, |_Paragraph|, and in 23 | future other presentation text objects. 24 | 25 | .. autoclass:: Font() 26 | :members: 27 | :member-order: bysource 28 | :undoc-members: 29 | 30 | 31 | |_Paragraph| objects 32 | -------------------- 33 | 34 | .. autoclass:: _Paragraph() 35 | :members: 36 | :member-order: bysource 37 | :undoc-members: 38 | 39 | 40 | |_Run| objects 41 | -------------- 42 | 43 | .. autoclass:: _Run() 44 | :members: 45 | :member-order: bysource 46 | :undoc-members: 47 | -------------------------------------------------------------------------------- /docs/api/util.rst: -------------------------------------------------------------------------------- 1 | .. _util: 2 | 3 | :mod:`util` Module 4 | ------------------ 5 | 6 | .. automodule:: pptx.util 7 | :members: 8 | :exclude-members: Collection, lazyproperty, to_unicode 9 | :member-order: bysource 10 | :undoc-members: 11 | :show-inheritance: 12 | 13 | -------------------------------------------------------------------------------- /docs/community/faq.rst: -------------------------------------------------------------------------------- 1 | Frequently Asked Questions 2 | ========================== 3 | -------------------------------------------------------------------------------- /docs/community/support.rst: -------------------------------------------------------------------------------- 1 | Support 2 | ======= 3 | 4 | We'd love to hear from you if you like |pp|, want a new feature, find a bug, 5 | need help using it, or just have a word of encouragement. 6 | 7 | The **mailing list** for |pp| is python-pptx@googlegroups.com 8 | 9 | The **issue tracker** is on github at `scanny/python-pptx`_. 10 | 11 | Feature requests are best broached initially on the mailing list, they can be 12 | added to the issue tracker once we've clarified the best approach, 13 | particularly the appropriate API signature. 14 | 15 | .. _`scanny/python-pptx`: 16 | https://github.com/scanny/python-pptx 17 | -------------------------------------------------------------------------------- /docs/community/updates.rst: -------------------------------------------------------------------------------- 1 | .. _updates: 2 | 3 | 4 | Software Updates 5 | ================ 6 | 7 | .. include:: ../../HISTORY.rst 8 | -------------------------------------------------------------------------------- /docs/dev/analysis/tbl-table-style.rst: -------------------------------------------------------------------------------- 1 | 2 | How table styles work 3 | --------------------- 4 | 5 | * PowerPoint allows many formatting characteristics of a table to be set at 6 | once by assigning a *table style* to a table. 7 | 8 | * PowerPoint includes an array of built-in table styles that a user can 9 | browse in the *table style gallery*. These styles are built into the 10 | PowerPoint *application*, and are only added to a `.pptx` file on first 11 | use. 12 | 13 | * Zero or more table-styles can appear in the `ppt/tableStyles.xml` part. 14 | Each is keyed with a UUID, by which it is referred to by a particular table 15 | that uses that style. 16 | 17 | * A table may be assigned a table style by placing the matching UUID in the 18 | `a:tbl/a:tblPr/a:tableStyleId` element text. 19 | 20 | * A default table style may be specified by placing its id in 21 | `a:tblStyleLst/@def` in the `tableStyles.xml` part. 22 | -------------------------------------------------------------------------------- /docs/dev/philosophy.rst: -------------------------------------------------------------------------------- 1 | Vision 2 | ====== 3 | 4 | A robust, full-featured, and well-documented general-purpose library for 5 | manipulating Open XML PowerPoint files. 6 | 7 | * **robust** - High reliability driven by a comprehensive test suite. 8 | 9 | * **full-featured** - Anything that the file format will allow can be 10 | accomplished via the API. (Note that visions often take some time to fulfill 11 | completely :). 12 | 13 | * **well-documented** - I don't know about you, but I find it hard to remember 14 | what I was thinking yesterday if I don't write it down. That's not a problem 15 | for most of my thinking, but when it comes to how I set up an object 16 | hierarchy to interact, it can be a big time-waster. So I like it when things 17 | are nicely laid out in black-and-white. Other folks seem to like that too 18 | :). 19 | 20 | * **general-purpose** - Applicability to all conceivable purposes is valued 21 | over being especially well-suited to any particular purpose. Particular 22 | purposes can always be accomplished by building a wrapper library of your 23 | own. Serving general purposes from a particularized library is not so easy. 24 | 25 | * **create AND manipulate** - While this library will perhaps most commonly be 26 | used for *writing* .pptx files, it will also be suitable for *reading* .pptx 27 | files and inspecting and manipulating their contents. I could see that coming 28 | in handy for full-text indexing, removing speaker notes, changing out 29 | templates, adding dynamically generated slides to static boilerplate, that 30 | sort of thing. 31 | -------------------------------------------------------------------------------- /docs/dev/resources/index.rst: -------------------------------------------------------------------------------- 1 | ========= 2 | Resources 3 | ========= 4 | 5 | ... just collected bits and pieces here for now ... 6 | 7 | .. toctree:: 8 | :maxdepth: 1 9 | 10 | python_packaging 11 | about_packaging 12 | about_relationships 13 | web_resources 14 | technical_topics 15 | applescript 16 | odds_and_ends 17 | 18 | -------------------------------------------------------------------------------- /docs/dev/resources/technical_topics.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | Technical Topics 3 | ================ 4 | 5 | Some technical topics that have become relevant to this project ... 6 | 7 | 8 | Python Metaclasses 9 | ================== 10 | 11 | * `Metaclass programming in Python`_ 12 | * `Python metaclasses by example`_ 13 | 14 | 15 | .. _`Metaclass programming in Python`: 16 | http://www.ibm.com/developerworks/linux/library/l-pymeta/index.html 17 | 18 | .. _`Python metaclasses by example`: 19 | http://eli.thegreenplace.net/2011/08/14/python-metaclasses-by-example/ 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/user/install.rst: -------------------------------------------------------------------------------- 1 | .. _install: 2 | 3 | Installing 4 | ========== 5 | 6 | |pp| is hosted on PyPI, so installing with `pip` is simple:: 7 | 8 | pip install python-pptx 9 | 10 | |pp| depends on the ``lxml`` package and ``Pillow``, the modern version of 11 | the Python Imaging Library (``PIL``). The charting features depend on 12 | ``XlsxWriter``. Both ``pip`` and ``easy_install`` will take care of 13 | satisfying these dependencies for you, but if you use the ``setup.py`` 14 | installation method you will need to install the dependencies yourself. 15 | 16 | Currently |pp| requires Python 2.7 or 3.3 or later. The tests are run against 2.7 and 17 | 3.8 on Travis CI. 18 | 19 | Dependencies 20 | ------------ 21 | 22 | * Python 2.6, 2.7, 3.3 or later 23 | * lxml 24 | * Pillow 25 | * XlsxWriter (to use charting features) 26 | -------------------------------------------------------------------------------- /docs/user/intro.rst: -------------------------------------------------------------------------------- 1 | .. _introduction: 2 | 3 | Introduction 4 | ============ 5 | 6 | *python-pptx* is a Python library for creating and updating PowerPoint (.pptx) 7 | files. 8 | 9 | A typical use would be generating a customized PowerPoint presentation from 10 | database content, downloadble by clicking a link in a web application. Several 11 | developers have used it to automate production of presentation-ready 12 | engineering status reports based on information held in their work management 13 | system. It could also be used for making bulk updates to a library of 14 | presentations or simply to automate the production of a slide or two that would 15 | be tedious to get right by hand. 16 | 17 | This user guide is tutorial in nature, introducing concepts along with code 18 | examples that I hope will allow you to learn what you need while addressing 19 | the real-life PowerPoint challenges you're working on. 20 | 21 | 22 | python-pptx License 23 | ------------------- 24 | 25 | .. include:: ../../LICENSE 26 | -------------------------------------------------------------------------------- /docs/user/use-cases.rst: -------------------------------------------------------------------------------- 1 | Use cases 2 | ========= 3 | 4 | The use case that drove me to begin work on this library has been to automate 5 | the building of slides that are tedious to compose by hand. As an example, 6 | consider the task of composing a slide with an array of 10 headshot images of 7 | folks in a particular department, with the person's name and title next to 8 | their picture. After doing this a dozen times and struggling to get all the 9 | alignment and sizes to the point where my attention to detail is satisfied, 10 | well, my coding fingers got quite itchy. 11 | 12 | However I believe a broader application will be server-side document 13 | generation on non-Windows server platforms, Linux primarily I expect. In my 14 | organization, I have found an apparently insatiable demand for PowerPoint 15 | documents as a means of communication. Once one rises beyond the level of 16 | project manager it seems the willingness to interpret text longer than a 17 | bullet point atrophies quite rapidly and PowerPoint becomes an everyday 18 | medium. I've imagined it might be pretty cool to be able to generate a 19 | "presentation-ready" deck for a salesperson that includes a particular subset 20 | of the product catalog they could generate with a few clicks to use in a sales 21 | presentation, for example. As you come up with applications I'd love to hear 22 | about them. 23 | -------------------------------------------------------------------------------- /features/cht-axistitle-props.feature: -------------------------------------------------------------------------------- 1 | Feature: Axis Title properties 2 | In order to customize the formatting of an axis title 3 | As a developer using python-pptx 4 | I need read/write properties on AxisTitle 5 | 6 | 7 | Scenario: AxisTitle.format 8 | Given an axis title 9 | Then axis_title.format is a ChartFormat object 10 | And axis_title.format.fill is a FillFormat object 11 | And axis_title.format.line is a LineFormat object 12 | 13 | 14 | Scenario Outline: Get AxisTitle.has_text_frame 15 | Given an axis title having text frame 16 | Then axis_title.has_text_frame is 17 | 18 | Examples: text frame presence cases 19 | | a-or-no | value | 20 | | a | True | 21 | | no | False | 22 | 23 | 24 | Scenario Outline: Set AxisTitle.has_text_frame 25 | Given an axis title having text frame 26 | When I assign to axis_title.has_text_frame 27 | Then axis_title.has_text_frame is 28 | 29 | Examples: axis_title.has_text_frame assignment cases 30 | | a-or-no | new-value | value | 31 | | no | True | True | 32 | | a | False | False | 33 | | no | False | False | 34 | | a | True | True | 35 | 36 | 37 | Scenario Outline: Get AxisTitle.text_frame 38 | Given an axis title having text frame 39 | Then axis_title.text_frame is a TextFrame object 40 | 41 | Examples: text frame presence cases 42 | | a-or-no | 43 | | a | 44 | | no | 45 | -------------------------------------------------------------------------------- /features/cht-category-props.feature: -------------------------------------------------------------------------------- 1 | Feature: Category properties 2 | In order to characterize a chart category 3 | As a developer using python-pptx 4 | I need properties on the Category object 5 | 6 | 7 | Scenario Outline: Category.idx 8 | Given a Category object having idx value 9 | Then category.idx is 10 | 11 | Examples: idx cases 12 | | idx | 13 | | 1 | 14 | | 2 | 15 | 16 | 17 | Scenario Outline: Category.label 18 | Given a Category object having