Questions tagged [python-pptx]

python-pptx is a Python library for creating and updating PowerPoint (.pptx) files.

python-pptx is a Python library for creating and updating PowerPoint (.pptx) files.

Latest documentation

Available from pypi.

734 questions
7
votes
1 answer

How to change font size of text within a table created by Python-pptx

I am creating a script to show graphs of product performance and creating a table to display its partnumber, a list of applications and the number of current applications. However, the default font size is much too large to get all of this…
Jeremy Barnes
  • 642
  • 1
  • 9
  • 24
7
votes
2 answers

Does python-pptx support saving a file as pdf?

I am playing around with python-pptx here but I need to also save as pdf and I don't seem to see that this library support this feature. Does anyone have a suggestion (either within this library or an external solution) to create a pptx file but…
leora
  • 188,729
  • 360
  • 878
  • 1,366
6
votes
1 answer

Read .pptx file from s3

I try to open a .pptx from Amazon S3 and read it using the python-pptx library. This is the code: from pptx import Presentation import boto3 s3 = boto3.resource('s3') obj=s3.Object('bucket','key') body =…
6
votes
2 answers

how to increase the slide size a python generated powerpoint presentation using python-pptx

Am trying to fit multiple charts into a python generated slide but I need the size of the slide to be wider. I looked through the available documentation provided which aren't much.
K. Abhulimen
  • 137
  • 1
  • 13
6
votes
1 answer

How to give chart title to a chart in Python-pptx chart in Chart Area(Not the slide title)

I am trying to add text to chart title in chart area in a PPT Slide(Not the slide title).I have http://python-pptx.readthedocs.io/en/latest/dev/analysis/cht-chart-title.html this link if any text can be added to my chart but I couldn't find the…
Shiva Prasad
  • 63
  • 1
  • 5
6
votes
1 answer

Color Specific Bar Chart Differently in Python PPTX

Is it possible in python-pptx to color a specific bar in a bar chart different from others? My intention is to color the bar based on values. By default, all is blue, but if the value is below certain threshold, the bar is colored red. Below is my…
idazuwaika
  • 2,749
  • 7
  • 38
  • 46
6
votes
2 answers

get the title of slides of pptx file using Python

I am trying to get the title of each slide of a powerpoint file using Python. I am using Presentation package in Python but I couldn't find anything that specifies the titles. I have this code that return the content of the powerpoint file. but I…
Minerva
  • 63
  • 2
  • 9
6
votes
1 answer

Python Insert Image into the middle of an existing PowerPoint

I have an existing PowerPoint presentation with 20 slides. This presentation serves as an template with each slide having different backgrounds. I want to take this (existing) PowerPoint presentation, insert an image in slide number 4 (do nothing…
Morganis
  • 652
  • 5
  • 13
  • 29
5
votes
2 answers

How change the font of a title of a slide in python-pptx?

I want to change the font size and font style of the title of the slide. I also want to underline the title. How to do that? from pptx import Presentation prs = Presentation(ppt_filename) slide = prs.slides[0] slide.shapes.title.text = 'New…
a b
  • 67
  • 1
  • 4
5
votes
2 answers

Check if image is decorative in powerpoint using python-pptx

The company I work at requires a list of all inaccessible images/shapes in a .pptx document (don't have alt-text and aren't decorative). To automate the process, I'm writing a script that extracts all inaccessible images/shapes in a specified .pptx…
kingler
  • 63
  • 5
5
votes
0 answers

Convert ppt to video using python in ubuntu environment

I have wrote a python script to convert ppt to video using pywin32 which is working fine but when i try to import my script on Ubuntu environment pywin32 doesn't work as its windows supported module. So i am trying to find something which can…
rohan
  • 61
  • 7
5
votes
1 answer

How to copy a slide with images using python pptx?

My end goal is to change the theme of a presentation. To do this, I have created a source template and a new template (with the correct theme). I iterate over each slide in the source template then add a new slide to the new template with the…
Michael Berk
  • 705
  • 7
  • 23
5
votes
2 answers

How to change default table style using pptx python?

I am creating a table using pptx python Reference: https://python-pptx.readthedocs.io/en/latest/dev/analysis/tbl-table.html When I create a table, I get the default table style and I would like to change it. Any recommendation? x, y, cx, cy =…
Jonathan Lam
  • 1,237
  • 3
  • 20
  • 49
5
votes
4 answers

Is it possible to combine two or more powerpoints using python-pptx?

I am trying to combine powerpoint slides and I am not sure how to do it. I found a python moduel pptx that looked promising. I tried copying the slide contents from 2 powerpoints to one new power point. But I ran into many issues like how to grab…
kingofjong
  • 175
  • 2
  • 14
5
votes
1 answer

python-pptx - Changing auto shape border color

I am trying to add a colour to the border of a rectangular auto shape that I have created as below. The default colour seems to be blue but I am not sure how could I modify that to a custom color. shapes = slide.shapes left = top = width = height =…
scott martin
  • 1,253
  • 1
  • 14
  • 36
1
2
3
48 49