We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Syncfusion Feedback


Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The Syncfusion .NET Word Library (DocIO) offers powerful and comprehensive APIs to convert a Word document into an image programmatically with a few lines of code without Microsoft Word or interop dependencies. It allows you to generate an entire document as images or a single page of a Word document as an image to provide the document’s preview, thumbnail, or to print it.


Key features

Fast and reliable

Convert complex Word documents into image files faster in a batch process, compared to Office automation libraries.

Partial trust environment

Convert Word documents to image files in partial trust environments like Azure and AWS.

Platform independent

Word Library is a non-UI component for automating the conversion of Word documents to images in .NET Framework, .NET Core, Blazor, Xamarin, and .NET MAUI applications.


Word-to-image options

Specific pages

Convert a specific page in a Word document into an image.

Specific range of pages

Convert a specified range of pages in a Word document into images.

Font substitution

The built-in font substitution event allows users to choose alternate fonts from the device or upload fonts with a few lines of code.


Convert the entire document to images

using Syncfusion.DocIO;
using Syncfusion.DocIO.DLS;
using Syncfusion.OfficeChartToImageConverter;

//Load an existing Word document.
using(WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx))
{
    //Initialize the ChartToImageConverter for converting charts.
    wordDocument.ChartToImageConverter = new ChartToImageConverter();
    //Convert the entire Word document to images.
    Image[] images = wordDocument.RenderAsImages(ImageType.Bitmap);
    //Save the image as jpeg.
    for (int i = 0; i < images.Length; i++)
        images[i].Save("WordToImage_" + i + ".jpeg", ImageFormat.Jpeg);
}

Convert first page of document to an image

using Syncfusion.DocIO;
using Syncfusion.DocIO.DLS;
using Syncfusion.OfficeChartToImageConverter;

using(WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx))
{
    wordDocument.ChartToImageConverter = new ChartToImageConverter();
    //Convert the first page of the Word document into an image.
    Image image = wordDocument.RenderAsImages(0, ImageType.Bitmap);
    image.Save("WordToImage.jpeg", ImageFormat.Jpeg);
}

Convert a specific range of pages to an image

using Syncfusion.DocIO;
using Syncfusion.DocIO.DLS;
using Syncfusion.OfficeChartToImageConverter;

using(WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx))
{
    wordDocument.ChartToImageConverter = new ChartToImageConverter();
    //Convert a specific range of pages in Word document to images.
    Image[] images = wordDocument.RenderAsImages(1, 2, ImageType.Bitmap);
    for (int i = 0; i < images.Length; i++)
        images[i].Save("WordToImage_" + i + ".jpeg", ImageFormat.Jpeg);
}

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Scroll up icon