本文整理汇总了Python中com.aspose.slides.Presentation.getLayoutSlides方法的典型用法代码示例。如果您正苦于以下问题:Python Presentation.getLayoutSlides方法的具体用法?Python Presentation.getLayoutSlides怎么用?Python Presentation.getLayoutSlides使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.aspose.slides.Presentation
的用法示例。
在下文中一共展示了Presentation.getLayoutSlides方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from com.aspose.slides import Presentation [as 别名]
# 或者: from com.aspose.slides.Presentation import getLayoutSlides [as 别名]
def __init__(self):
dataDir = Settings.dataDir + 'WorkingWithSlidesInPresentation/AddSlides/'
# Instantiate Presentation class that represents the presentation file
pres =Presentation()
# Instantiate SlideCollection calss
slides = pres.getSlides()
i = 0
while i < pres.getLayoutSlides().size():
# Add an empty slide to the Slides collection
slides.addEmptySlide(pres.getLayoutSlides().get_Item(i))
i+=1
#Do some work on the newly added slide
# Saving the presentation
save_format = SaveFormat
pres.save(dataDir + "EmptySlide.pptx", save_format.Pptx)
print "Document has been created, please check the output file."