How to Convert Word Document to Images using C++

This topic shows, how to convert Word Document to Images using C++ in a very simple manner. You can convert specific or all pages of a Word document to any of image formats including Tiff, PNG, JPEG and BMP in C++.

Steps to Convert Word Document to Images using C++

  1. Use Aspose.Words.Cpp NuGet package
  2. Include reference to Aspose::Words and Saving namespaces
  3. Create an instance of Document Class to load the source Word file
  4. Set the SaveFormat to PNG
  5. Set the Page Ranges for saving as image and set Callback
  6. Save the Word File to Image in C++ by using Save method

In the following example, we have shown how to add DOCX comments in C++ using few API calls with no dependence on Microsoft Word or Office Interop API.

Code to Convert Word Document to Images using C++

In previous example, we saw How to Convert HTML to PDF using C++. In this topic, we have shown how to export Word Document to images in C++. You have seen, how easy it is to render document to PNG in C++ using few lines of code.

 English