Learn how to convert Word documents to TIFF in Python: https://blog.aspose.com/2021/11/08/convert-word-to-tiff-using-python/
Last active
November 8, 2021 14:52
-
-
Save aspose-com-gists/d976d7e4bbfa9eae014c85d1bdf06620 to your computer and use it in GitHub Desktop.
Convert Word Documents to TIFF in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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