If I want to export ppt as a thumbnail or PDF file, how can I achieve this?
Currently, I am getting a blank object when I try to add Map. Please check the images attached.
for ppt and pdf export:
presentation.save("sample.pptx",
slides.export.SaveFormat.PPTX,
)
# Instantiates the PdfOptions class
pdfOptions = slides.export.PdfOptions()
# Sets the Jpeg quality
pdfOptions.jpeg_quality = 70
# Sets the behavior for metafiles
pdfOptions.save_metafiles_as_png = True
pdfOptions.sufficient_resolution = 64
# Sets the text compression level
pdfOptions.text_compression = slides.export.PdfTextCompression.FLATE
# Defines the PDF standard
pdfOptions.compliance = slides.export.PdfCompliance.PDF15
presentation.save("sample.pdf",
slides.export.SaveFormat.PDF,
pdfOptions,
)
For thumbnail export:
scale_x = (1.0 / ppt.slide_size.size.width) * 1024
scale_y = (1.0 / ppt.slide_size.size.height) * 576
with slide.get_thumbnail(scale_x, scale_y) as bmp:
bmp.save("img.png", draw.imaging.ImageFormat.png)
return file_name
Screenshot from 2023-01-26 20-54-25.png (120.6 KB)
Screenshot from 2023-01-26 20-54-13.png (55.5 KB)
Screenshot from 2023-01-26 20-53-52.png (91.7 KB)