Aspose.Words  Cloud SDK for Go

Work with Word Documents in Go (Golang)

Powerful Go library for creating, editing and processing Word DOCX, DOC, RTF files

Get Started

Powerful Go library for creating, editing and processing Word DOCX, DOC, RTF files. Open, generate, edit, split, merge, compare and convert Office Word documents using Golang library. Easily convert PDF to Word (DOC, DOCX, ODT, RTF and HTML) and in the opposite direction with Aspose Cloud Go library.

Advanced Word Document Processing Features

Merge multiple Word documents

Split all or specific pages of a Word document

Convert Word documents to different formats

Manipulate document properties

Execute simple to complex mail merge

Execute mail merge template

Insert scaled images on merge fields

Insert a page number field into Word documents

Insert or edit watermark in Word documents

Find or replace text in Word documents

Password protect Word documents or update document protection

Load & convert PDF documents to Word formats including DOC & DOCX

About Go language

Go, also known as Golang, is a modern general-purpose programming language that is simple to learn, easy to read and convenient to use. Over the last few years, it has turned into one of the industry's favorite languages for building distributed systems, large-scale solutions and cloud-native services. Go is designed for professional programmers who want to build reliable and robust production software with high-level abstractions, ease of automation, complex event processing, runtime efficiency and perfect scalability.

Compared to many other languages that lack native support for multicore and multiprocessor computers, Go can be very efficient with its built-in concurrency and parallelism support. Lightweight computation threads called Goroutines together with Channels for communication between them, make it relatively easy for Go developers to write code that efficiently utilizes all available CPU cores, whereas the multiplexing of Goroutines onto OS threads is done automatically.

Other major Golang features include:

  • High-speed compilation.
  • Garbage collection support for safe memory management.
  • Stack management for memory optimization.
  • Static linking and clear dependency management. Developers don’t need to worry anymore about dependencies and library versions.
  • High-performance networking. The Golang environment comes with a powerful networking package in the standard library.

What is Cloud Go SDK

Words Cloud API is a modern REST API designed to control Word documents programmatically and incorporate a full-featured document processing functionality into distributed software solutions. It is not limited to the preparation of Word documents only, but also includes a wide range of advanced features.


Using Go you can efficiently utilize the Aspose Cloud API without the need to deal with low-level HTTP transactions. This helps to make fewer errors, find and correct them faster. But what is more important, it allows you to focus directly on the application's business logic. Also, it should be noted that Go has an easy-to-understand syntax, familiar to any developer with a C-language background.

Have a look at the Developer Guide detailing functions and features of Go SDK.

Wide Functionality

Go SDK assists in reading, editing, merging, splitting documents and converting to different formats. You can work with a complete set of Word document components, such as main text, sections, headers, footers, tables, drawing objects, fonts, hyperlinks, comments, watermarks, math objects and others.

For detailed information about the content of this SDK, including a description of new features, please see the GitHub Repository.

You can test the Cloud API functionality directly from your web browser with our online converter, viewer, editor, splitter, merger and other apps.


All Aspose Cloud SDKs are kept in sync with REST API endpoints as they are added or enhanced. Our team tests them thoroughly before deployment, therefore developers can be assured that Go SDK is reliable, fault-free and ready for production use.

Regardless of the programming language, you need to register within Words Cloud Services and obtain Client Id & Client Secret credentials before leveraging Cloud API. The Client Id-Secret pair is used to authenticate API requests and provide a secure way to transmit your data.

Go Cloud SDK Installation

The following are step-by-step instructions on how to install the Go SDK:

  1. Download and install the Go environment.
  2. Import the Go SDK into your project by adding aspose_words_cloud dependency in pubspec.yaml:

Ease of Automation

The preparation of documents has always been a tedious process, but with the help of Go Cloud SDK you can automate your document-related tasks with ease.

Our team is targetting to provide developers with high flexibility and performance. The architecture of Words Cloud API is very flexible, and it can be applied to all kinds of applications, independent of operating systems and programming languages.

You can automate your everyday documentation workflow tasks and increase overall business productivity by creating scalable, resilient and platform-independent applications.

Go Cloud SDK Installation

Here go step-by-step instructions:

  1. Download and install the Go compiler.
  2. Use “go get -v“ command to install Go Cloud SDK from GitHub repository.

Getting started with Go Cloud SDK

The following simple Golang code samples show how to integrate into Words Cloud Services and demonstrate the use of some basic API calls. Check the Developer's Guide for other usage scenarios.

Convert PDF to Word in Go

The following code sample shows how to convert PDF to DOCX in the Cloud and save the result to a local file:

Convert Word documents to PDF - Go

config, _ := models.NewConfiguration("config.json")
wordsApi, ctx, _ := api.CreateWordsApi(config)

// Request a conversion of "sample.pdf" into "docx" format
document, _ := os.Open("sample.pdf")
response, _ := wordsApi.ConvertDocument(ctx, document, "docx", nil)
defer response.Body.Close()

// Save response in "sample.docx"
output, _ := os.Create("sample.docx")
defer output.Close()
io.Copy(output, response.Body)
	"AppKey": "##################",
	"AppSid": "####-####-####-####-####"

Support and Learning Resources