---
title: "Saving a Document as a Multipage TIFF"
---

```
*Purpose Summary. What is this page about?*

This article demonstrates how to convert a document to a multi‑page TIFF using Aspose.Words for Python via .NET, including basic conversion and configuring rendering options such as resolution, page range, compression, color mode, and binarization.

```

When working with documents, you often need to convert your document to a raster image file(s). This is especially relevant if you have to present your document in a readable and printable, but not editable format. For example, you can use a raster image of the first page of your document as a preview. This article describes how to convert a document to a raster image using the example of the TIFF format - one of the more popular image formats.

## Converting DOC to Multi-Page TIFF

In Aspose.Words, conversion from DOC to TIFF can be performed with one line of code, by simply passing the "save to" path and the relevant file extension to the [save](https://reference.aspose.com/words/python-net/aspose.words/document/save/) method. The [save](https://reference.aspose.com/words/python-net/aspose.words/document/save/) method automatically derives the [SaveFormat](https://reference.aspose.com/words/python-net/aspose.words/saveformat/) from the file name extension specified in the path. The following example demonstrates how to convert a document to the TIFF format:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-File Formats and Conversions-Save Options-working_with_image_save_options-SaveAsTIFF.py" >}}

## Specifying Additional Options When Rendering TIFF

You often need to specify additional options, which affect the rendering result. For this purpose, use the [ImageSaveOptions](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/) class, which contains properties that determine how the document is displayed on the image. You can specify the following:

- Save format to determine the list of available options ([save_format](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/save_format/))
- Resolution ([horizontal_resolution](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/horizontal_resolution/), [vertical_resolution](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/vertical_resolution/))
- Number of pages ([page_set](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/page_set/))
- Color and lighting settings ([paper_color](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/paper_color/), [image_color_mode](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/image_color_mode/), [image_brightness](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/image_brightness/), [image_contrast](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/image_contrast/))
- Image quality ([jpeg_quality](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/jpeg_quality/), [scale](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/scale/), [tiff_compression](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/tiff_compression/))
- Method used to binarize the image ([tiff_binarization_method](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/tiff_binarization_method/), [threshold_for_floyd_steinberg_dithering](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/threshold_for_floyd_steinberg_dithering/))
- Pixel format for generated images ([pixel_format](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/pixel_format/))
- Windows metafiles handling by Aspose.Words ([metafile_rendering_options](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/metafile_rendering_options/), [use_gdi_emf_renderer](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/use_gdi_emf_renderer/))
- Additional options that you can see in the [ImageSaveOptions](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/) class

The following example shows how to convert DOC to TIFF with configured options:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-File Formats and Conversions-Save Options-working_with_image_save_options-GetTiffPageRange.py" >}}

## Threshold for TIFF Binarization

A TIFF image can be saved in 1bpp b/w format by setting the [pixel_format](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/pixel_format/) property to [FORMAT1BPP_INDEXED](https://reference.aspose.com/words/python-net/aspose.words.saving/imagepixelformat/#format1bpp_indexed) pixel format type, and the [tiff_compression](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/tiff_compression/) property to either [CCITT3](https://reference.aspose.com/words/python-net/aspose.words.saving/tiffcompression/#ccitt3) or [CCITT4](https://reference.aspose.com/words/python-net/aspose.words.saving/tiffcompression/#ccitt4).

For image segmentation, Aspose.Words uses the simplest method - thresholding. This method converts a gray‑scale TIFF image into a binary image, using a threshold value. Therefore, when a document needs to be converted to the TIFF file format, it is possible to get or set the threshold for TIFF binarization via the [threshold_for_floyd_steinberg_dithering](https://reference.aspose.com/words/python-net/aspose.words.saving/imagesaveoptions/threshold_for_floyd_steinberg_dithering/) property. The default value for this property is set to 128, and the higher this value, the darker the image.

The following example shows how to perform TIFF binarization with a specified threshold:

{{< gist "aspose-words-gists" "e9d8f984dac599756ccb4a64b8c79768" "Examples-DocsExamples-DocsExamples-File Formats and Conversions-Save Options-working_with_image_save_options-ExposeThresholdControlForTiffBinarization.py" >}}

Below you can compare images on which TIFF binarization was performed at various threshold values:

![saving-a-document-as-a-multipage-tiff-aspose-words-net](saving-a-document-as-a-multipage-tiff-1.jpg)

------

## FAQ

1. **Q:** How can I change the resolution of the saved TIFF image?
   **A:** Use the `horizontal_resolution` and `vertical_resolution` properties of `ImageSaveOptions`. Set them to the desired DPI before calling `document.save`. Example:

   ```python
   from aspose.words import Document, ImageSaveOptions, SaveFormat
   doc = Document("input.docx")
   options = ImageSaveOptions(SaveFormat.TIFF)
   options.horizontal_resolution = 300
   options.vertical_resolution = 300
   doc.save("output.tiff", options)
   ```

2. **Q:** How do I save only specific pages of a document to a multi‑page TIFF?
   **A:** Configure the `page_set` property with a `PageSet` that lists the required page numbers. Example:

   ```python
   from aspose.words import Document, ImageSaveOptions, SaveFormat, PageSet
   doc = Document("input.docx")
   options = ImageSaveOptions(SaveFormat.TIFF)
   options.page_set = PageSet(1, 3, 5)   # saves pages 1, 3 and 5
   doc.save("selected_pages.tiff", options)
   ```

3. **Q:** Which settings control TIFF compression and how can I choose CCITT4 compression?
   **A:** Set the `tiff_compression` property of `ImageSaveOptions` to `TiffCompression.CCITT4`. This is suitable for 1‑bit black‑and‑white images. Example:

   ```python
   from aspose.words import Document, ImageSaveOptions, SaveFormat, TiffCompression
   doc = Document("input.docx")
   options = ImageSaveOptions(SaveFormat.TIFF)
   options.tiff_compression = TiffCompression.CCITT4
   doc.save("compressed.tiff", options)
   ```

4. **Q:** How can I produce a 1‑bit black‑and‑white TIFF image?
   **A:** Set `pixel_format` to `ImagePixelFormat.FORMAT1BPP_INDEXED` and choose an appropriate compression (CCITT3 or CCITT4). Example:

   ```python
   from aspose.words import Document, ImageSaveOptions, SaveFormat, ImagePixelFormat, TiffCompression
   doc = Document("input.docx")
   options = ImageSaveOptions(SaveFormat.TIFF)
   options.pixel_format = ImagePixelFormat.FORMAT1BPP_INDEXED
   options.tiff_compression = TiffCompression.CCITT3
   doc.save("bw.tiff", options)
   ```

5. **Q:** How do I adjust the threshold used for TIFF binarization?
   **A:** Use the `threshold_for_floyd_steinberg_dithering` property. The default is 128; increase the value for a darker image. Example:

   ```python
   from aspose.words import Document, ImageSaveOptions, SaveFormat, TiffBinarizationMethod
   doc = Document("input.docx")
   options = ImageSaveOptions(SaveFormat.TIFF)
   options.tiff_binarization_method = TiffBinarizationMethod.FLOYD_STEINBERG_DITHERING
   options.threshold_for_floyd_steinberg_dithering = 150
   doc.save("threshold.tiff", options)
   ```
