Convert Image to Searchable Word Document (DOC/DOCX) using Java

convert-Image-to-DOCX-OCR-java

You can convert an image to a searchable or editable word document in DOCX as well as DOC file format. Popular image formats like JPG, PNG, TIFF, BMP, etc., can be converted to a word document (DOC/DOCX) with OCR in Java. Please refer to the following topics to learn more:

Image to Word Document Converter – Java API Installation

Aspose.OCR for Java can be used for efficient optical character recognition of images. You can convert scanned images to searchable DOCX files programmatically using Java. Please download the JAR file from New Releases or configure it in the pom.xml file of your Maven-based project as explained under:

Repository

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>http://repository.aspose.com/repo/</url>
</repository>

Dependency

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-ocr</artifactId>
    <version>20.5</version>
</dependency>

Convert Image to Searchable Word Document (DOC/DOCX) using Java

You can convert an image to a searchable word document with the below steps:

  1. Declare an instance of AsposeOcr class.
  2. Instantiate RecognitionSettings class object.
  3. Recognize input image with RecognizePage method.
  4. Finally, save the output in Microsoft Word Document (DOC/DOCX) format.

The following code shows how to convert an image to a word document (DOC/DOCX) using Java:

Convert Image to Searchable Word Document (DOC/DOCX) with Spell Check in Java

You can convert an image to a word document (DOCX/DOC) with the following steps:

  1. Firstly, specify an instance of AsposeOcr class.
  2. Declare RecognitionSettings class object.
  3. Recognize image with OCR using the RecognizePage method.
  4. Save the result in Word Document (DOC/DOCX) format with spellcheck.

The code below explains how to convert an image to a searchable word document with spell check in Java:

Get Free API License

You can test the API in its full capacity with a Free Temporary License.

Conclusion

In this article, you have learned how to convert an image to a word document (DOC/DOCX). Moreover, you can enhance the accuracy by spell-checking with the respective dictionary. Please go through the API documentation for more information. Furthermore, feel free to get in touch with us at the Free Support Forum.

See Also