Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active March 8, 2022 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/1fa402fc19dcf41f6a169d63cabee21d to your computer and use it in GitHub Desktop.
Save aspose-com-gists/1fa402fc19dcf41f6a169d63cabee21d to your computer and use it in GitHub Desktop.
Convert PowerPoint PPT or PPTX to TIFF in Python
import aspose.slides as slides
# Load presentation
presentation = slides.Presentation("presentation.pptx")
# Instantiate the TiffOptions class
opts = slides.export.TiffOptions()
# Set pixel format
opts.show_hidden_slides = True
# Save PPT as TIFF
presentation.save("ppt-to-tiff-hidden-slides.tiff", slides.export.SaveFormat.TIFF, opts)
import aspose.slides as slides
import aspose.pydrawing as drawing
# Load presentation
presentation = slides.Presentation("presentation.pptx")
# Instantiate the TiffOptions class
opts = slides.export.TiffOptions()
# Set compression type
opts.compression_type = slides.export.TiffCompressionTypes.DEFAULT
opts.notes_comments_layouting.notes_position = slides.export.NotesPositions.BOTTOM_FULL
# Set image DPI
opts.dpi_x = 200
opts.dpi_y = 100
# Set image size
opts.image_size = drawing.Size(1728, 1078)
# Save PPT as TIFF
presentation.save("ppt-to-tiff-custom-image.tiff", slides.export.SaveFormat.TIFF, opts)
import aspose.slides as slides
# Load presentation
presentation = slides.Presentation("presentation.pptx")
# Instantiate the TiffOptions class
opts = slides.export.TiffOptions()
# Set pixel format
opts.pixel_format = slides.export.ImagePixelFormat.FORMAT8BPP_INDEXED
# Save PPT as TIFF
presentation.save("ppt-to-tiff-pixel-format.tiff", slides.export.SaveFormat.TIFF, opts)
import aspose.slides as slides
# Load presentation
presentation = slides.Presentation("presentation.pptx")
# Save PPT as TIFF
presentation.save("ppt-to-tiff.tiff", slides.export.SaveFormat.TIFF)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment