JPG is one of the commonly used image formats. JPG format supports lossy compression which reduces the file size of the images. There could be the case when you need to import a JPG image to the Word document from within your .NET applications. Also, you may get a batch of JPG images that you need to convert into a Word document. To achieve that, this article shows how to convert JPG images to Word document in C# .NET.
- C# JPG to Word Converter - Free Download
- Steps to Convert JPG to Word in C#
- Convert JPG to Word in C#
C# JPG to Word Converter - Free Download
To convert JPG images to a Word document, we will use Aspose.Words for .NET. The API is designed to create and manipulate Word documents from within .NET applications. In addition, it provides a high quality converter for the conversion of document and image files. You can download the API’s DLL or install it from NuGet using the package manager console.
PM> Install-Package Aspose.Words
Steps to Convert JPG to Word in C#
Aspose.Words for .NET makes it quite easier for you to convert JPG images to Word document within a few steps. The following are the steps to convert a JPG to Word in C# using Aspose.Words for .NET.
- Install Aspose.Words for .NET in your application.
- Create a new Word document.
- Insert JPG image into the document using JPG file’s path.
- Save document to your desired location.
Convert JPG to Word in C#
The following are the steps along with classes and methods to convert a JPG image to Word in C#.
- Create an instance of Document class.
- Create an instance of DocumentBuilder class and initialize it with Document object.
- Insert JPG image into the document by its path using DocumentBuilder.InsertImage(string) method.
- Save the output Word document using Document.Save(string) method.
The following code sample shows how to convert a JPG to Word in C#.
C# JPG to Word Converter - Get a Free License
You can use Aspose.Words for .NET without evaluation limitations using a temporary license.
In this article, you have learned how to convert a JPG to Word in C#. You can simply install Aspose.Words in your application and convert single or batch of JPG images to a Word document in C#. Furthermore, you can explore other features offered by the API using the documentation. Also, you can feel free to ask your questions via our forum.