# https://www.globalsino.com/ICs/
# Check if the folder has a file with a specific partial filename

from pptx import Presentation
from pptx.util import Pt,Cm
from pptx.dml.color import RGBColor
from pptx.enum.text import MSO_VERTICAL_ANCHOR, PP_PARAGRAPH_ALIGNMENT
from pptx.enum.text import PP_ALIGN


ppt = Presentation()

# Slide 1
Slide1_Register = ppt.slide_layouts[0]
Slide1 = ppt.slides.add_slide(Slide1_Register)
title1  = Slide1.shapes.title
Subtitle1 = Slide1.placeholders[1]
# Insert title with tests
title1.text = "Experimental Results"
Subtitle1.text = "GlobalSino"

left, top, width, height = Cm(9), Cm(5), Cm(12), Cm(1.2)
textBox = Slide1.shapes.add_textbox(left=left, top=top, width=width, height=height)

tf = textBox.text_frame

tf.margin_bottom = Cm(0.1)  
tf.margin_left = 0
# MSO_VERTICAL_ANCHOR: TOP, MIDDLE, BOTTOM, MIXED.
tf.vertical_anchor = MSO_VERTICAL_ANCHOR.BOTTOM  
tf.word_wrap = True  

tf.paragraphs[0].text = "Time Dependent Dielectric Breakdown (TDDB) an important parameter for MOS device reliability. It is an electrical parameter that such a device is required to keep during its working life and is related to a physical phenomenon that can degrade the device performances. If an electric field is applied for a long enough time, the dielectric slowly degrades (wear out), and eventually breaks down anyway. Figure 4876 shows a graphical representation of TDDB failure percentage as a function of operating stresses in a 90nm SRAM module case."

# PP_ALIGN has CENTER, DISTRIBUTE, JUSTIFY, JUSTIFY_LOW, LEFT, RIGHT, THAI_DISTRIBUTE, and MIXED.
tf.paragraphs[0].alignment = PP_ALIGN.CENTER  
tf.paragraphs[0].font.name = 'Verdana'
tf.paragraphs[0].font.bold = True
tf.paragraphs[0].font.italic = True  
tf.paragraphs[0].font.color.rgb = RGBColor(255, 0, 0) 
tf.paragraphs[0].font.size = Pt(10) 

# Slide 1
Slide2_Register = ppt.slide_layouts[0]
Slide2 = ppt.slides.add_slide(Slide1_Register)
title2  = Slide2.shapes.title
Subtitle2 = Slide2.placeholders[1]
# Insert title with tests
title2.text = "Experimental Results"
Subtitle2.text = "GlobalSino"

left, top, width, height = Cm(9), Cm(5), Cm(12), Cm(1.2)
textBox = Slide2.shapes.add_textbox(left=left, top=top, width=width, height=height)

tf2 = textBox.text_frame

tf2.margin_bottom = Cm(0.1)  
tf2.margin_left = 0
# MSO_VERTICAL_ANCHOR: TOP, MIDDLE, BOTTOM, MIXED.
tf2.vertical_anchor = MSO_VERTICAL_ANCHOR.BOTTOM  
tf2.word_wrap = True  

tf2.paragraphs[0].text = "Time Dependent Dielectric Breakdown (TDDB) an important parameter for MOS device reliability. It is an electrical parameter that such a device is required to keep during its working life and is related to a physical phenomenon that can degrade the device performances. If an electric field is applied for a long enough time, the dielectric slowly degrades (wear out), and eventually breaks down anyway. Figure 4876 shows a graphical representation of TDDB failure percentage as a function of operating stresses in a 90nm SRAM module case."

# PP_ALIGN has CENTER, DISTRIBUTE, JUSTIFY, JUSTIFY_LOW, LEFT, RIGHT, THAI_DISTRIBUTE, and MIXED.
tf2.paragraphs[0].alignment = PP_ALIGN.DISTRIBUTE  
tf2.paragraphs[0].font.name = 'Verdana'
tf2.paragraphs[0].font.bold = True
tf2.paragraphs[0].font.italic = True  
tf2.paragraphs[0].font.color.rgb = RGBColor(255, 0, 0) 
tf2.paragraphs[0].font.size = Pt(10) 


ppt.save(r"C:\0Python\Test.pptx")
