Open Source Go Library for Converting Microsoft® Word Processing Files

Convert Microsoft Word Processing Documents to Plain Text via Free GO API 

What is Docconv?

Oftentimes, while working with Microsoft Word Processing documents, the developers need the document text in plain format. Sometimes, they process the text or just display it in a different format. The open-source and free API Docconv allows GO developers to extract text from DOC and DOCX in plain format.

The library is developed completely in GO but has some dependencies to work properly. The API requires tidy, wv, popplerutils, and unrtf JustText

Previous Next

Getting Started with Docconv

The recommended way Docconv into your project is by using GitHub. Please use the following command for a smooth installation.

Install Docconv via GitHub

$ go get code.sajari.com/docconv/...

                        

Convert DOCX to Plain Text via Free Go API

The open source library Docconv allows computer programmers to convert DOCX to Plain Text inside their own Go applications. In order to convert your DOCX to Plain Text, you just need to load your document and convert it using occonv.ConvertPath() method. By using the following lines of code, you can easily convert DOCX to Plain Text.

Convert Word Processing to Text in GO

  1. Create a new client
  2. Convert DOCX to Text using client.ConvertPath() and pass file path as parameter
  3. Check for errors
  4. Print plain text

Convert DOCX to Text via Free GO API

// create a new client
c := client.New()
// convert DOCX to Text
res, err := client.ConvertPath(c, "fileformat.docx")
if err != nil {
    log.Fatal(err)
}
// print output
fmt.Println(res)
                        
 English