Wie gebe ich Text einen Schatten in Python-PPTX?Python

Python-Programme
Anonymous
 Wie gebe ich Text einen Schatten in Python-PPTX?

Post by Anonymous »

Ich arbeite an einem Projekt, bei dem ich mit Python-PPTX einen PowerPoint erstellen muss. Ich muss einen Text hinzufügen, der einen Schatten hat, um so zu erscheinen: < /p>

< /p>

Hier ist der Code, den ich verwende: < /p>

Code: Select all

from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.shapes import MSO_SHAPE
from pptx.dml.color import RGBColor
from pptx.enum.dml import MSO_THEME_COLOR
Temppath ="C:/Rept/Template/Template16.pptx"
prs= Presentation(Temppath)
slides =prs.slides[12]
shapes=slides.shapes
Month= "October"
premont="Septmeber"

for shape in shapes:
if shape.has_text_frame:
Text_frame=shape.text_frame
text=Text_frame.text
text= text.split(" ")
if "PrevMonth" in text:
strText=" ".join(text)
strText = strText.replace("PrevMonth",premont)
print(strText)
p=Text_frame.paragraphs[0]
p.clear()
run = p.add_run()
run.text= strText
font= run.font
font.color.theme_color = MSO_THEME_COLOR.DARK_2
#font.color.rbg=RGBColor(87,24,24)

prs.save('test3.pptx')

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post
  • Wie gebe ich eine einfache ASCII-Tabelle in PHP aus?
    by Guest » » in Php
    0 Replies
    9 Views
    Last post by Guest
  • Wie verwendet ich Python-PPTX, um seltene Tische zu extrahieren?
    by Anonymous » » in Python
    0 Replies
    13 Views
    Last post by Anonymous
  • Innerer Schatten im Text mit CSS
    by Guest » » in HTML
    0 Replies
    7 Views
    Last post by Guest
  • Innerer Schatten im Text mit CSS
    by Guest » » in CSS
    0 Replies
    4 Views
    Last post by Guest
  • Innerer Schatten im Text mit CSS
    by Guest » » in HTML
    0 Replies
    4 Views
    Last post by Guest