In this brief topic, we will elaborate how to convert Word to TIFF using C++. You can load an input Word document in DOCX or DOC formats using C++. You may need to convert Word document to TIFF using C++ to preview the contents of the document using simple code and few API calls.
Steps to Convert Word to TIFF using C++
- Configure Aspose.Words.Cpp using NuGet package Manager tool
- Add the reference to Aspose::Words and Aspose::Words::Saving namespaces
- Initialize a Document Class instance to load document for creating TIFF file
- Create an object of ImageSaveOptions class and set different properties
- Write the output file as a TIFF image with the Save method
In these steps, we have noticed how to export Word document to TIFF in C++. You can set different properties to control the process of Word to TIFF conversion. For example, you can specify the compression and color mode of output image to create the output file as a grayscale or color image.
Code to Convert Word Document to TIFF using C++
In the code snippet above, first we load the input Word file using the Document class and then set different preferences for the output image using the ImageSaveOptions class. Finally, we call the Save method for writing the output image which is rendered with high fidelity. You do not need to install MS Word or any other application to convert Word to TIFF file using C++.
In previous topic, we looked in to how to create DOCX in C++. However, in this topic, we have focused on converting Word to TIFF format in C++.