Convert Word DOC to PNG, JPEG, or BMP in C#

Do you need to generate thumbnails of a Word document programmatically or you have to embed document pages into your applications? If so, let me introduce a high-speed and high-quality converter to convert Word DOC to PNG in C#. So let’s see how to perform DOC/DOCX to PNG conversion in a .NET application.

C# Library to Convert DOCX to PNG

We will use Aspose.Words for .NET for DOC to PNG conversion. It is a powerful library that allows you to create and process MS Word documents. Moreover, it lets you convert Word documents to PNG format with high quality. Also, you can convert DOC to PNG for free.

You can download the library’s DLL or install it directly from NuGet.

PM> Install-Package Aspose.Words

How to Convert DOC to PNG in C#

Aspose.Words for .NET makes it quite easier for you to convert a DOC/DOCX to desired image format. You can set the output image format as PNG, JPEG, BMP, GIF, or TIFF using SaveFormat enum. The following are the steps to convert DOC/DOCX to PNG image in C#.

The following code sample shows how to convert a DOCX to PNG in C#.

C# Save DOCX as PNG with Customization

You can also control the DOC to PNG conversion using different options. For example, you can set horizontal resolution, vertical resolution, overall resolution, scale, pixel format, brightness, color mode, contrast, and paper color. The following are the steps to customize DOC to PNG conversion in C#.

The following code sample shows how to control C# DOC to PNG conversion using different options.

Free C# DOC to PNG Converter

You can get a free temporary license and convert DOC files to PNG without evaluation limitations.

Conclusion

In this article, you have learned how to convert Word DOC/DOCX to PNG images in C#. Moreover, you have seen how to control DOC to PNG conversion using different options. Apart from that, you can explore other features offered by Aspose.Words for .NET using the documentation. Also, you can post your questions on our forum.

See Also