Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active November 8, 2021 14:52
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/d976d7e4bbfa9eae014c85d1bdf06620 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/d976d7e4bbfa9eae014c85d1bdf06620 to your computer and use it in GitHub Desktop.
Convert Word Documents to TIFF in Python
import aspose.words as aw
# load Word document
doc = aw.Document("Document.docx")
# set save options
saveOptions = aw.saving.ImageSaveOptions(aw.SaveFormat.TIFF)
saveOptions.page_set = aw.saving.PageSet([0, 1])
saveOptions.tiff_compression = aw.saving.TiffCompression.CCITT4
saveOptions.resolution = 160
# convert Word to TIFF
doc.save("word-to-tiff.tiff", saveOptions)
import aspose.words as aw
# load Word document
doc = aw.Document("Document.docx")
# convert Word to TIFF
doc.save("word-to-tiff.tiff")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment