1. Products
  2.   Word Processing
  3.   GO
  4.   Aspose.Words Cloud SKD for Go

Aspose.Words Cloud SKD for Go

 
 

Go REST API to Process Microsoft Word Documents

Go Word Documents Processing REST API to Generate, Modify, Manipulate, Render, Embed, Print & Convert Word Processing Documents (DOC, DOCX, RTF, HTML, PDF, XPS, EPUB).

What is Aspose.Words Cloud SDK for Go?

TheAspose.Words Cloud SDK for Go is a versatile Go library designed for software developers. It enables you to handle Microsoft Word documents in the cloud with ease. Whether you want to create, edit, convert, or extract information from Word files, this SDK is a fantastic tool to streamline your tasks effectively. The library supports various word processing formats like DOC, DOCX, RTF, DOT, DOTX, DOTM, FlatOPC (XML) and more, making it a valuable resource for your projects.

The Aspose.Words Cloud SDK for Go provides developers with a treasure trove of useful tools. With this SDK, you can do many things like crafting fresh Word documents, tweaking formats and styles, converting Word files to different formats, plucking images from documents, extracting text from images, merging several Word files, dividing one document into many, and adding or deleting content from particular sections. These features are super handy for your development tasks.

If you need to handle Word documents smartly, Aspose.Words Cloud SDK for Go is your go-to solution. This toolkit allows developers to easily switch their text files to various popular formats like DOC, DOCX, PDF, HTML, and more. With a bunch of useful features, Aspose.Words Cloud SDK is a handy helper for developers dealing with Word files regularly.

Previous Next

Getting Started with Aspose.Words Cloud SKD for Go

The recommend way to install Aspose.Words Cloud SKD for Go is using GitHub. Please use the following command for a smooth installation.

Install Aspose.Words Cloud SKD for Go via GitHub

go get -v github.com/aspose-words-cloud/aspose-words-cloud-go/2007/api 
Here You can download it directly from GitHub.

Word Documents Creation via Go API

Aspose.Words Cloud SDK for Go makes it easy for software developers to create and manipulated word processing documents with just a couple of lines of code. The library allows software developers to generate a new document in the Cloud Storage in the format specified by the file extension. The library has included several important features related to Word documents creation, such as inserting text from the outer file, add images to an existing file, insert headers and footers, add tables, split large documents, add hyperlinks to Word documents, insert page numbers, add lists to Word documents, and many more.

How to Create a New Document via GO REST API

 import (
    "os"
    "github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models")

config, _ := models.NewConfiguration("config.json")
wordsApi, ctx, _ := api.CreateWordsApi(config)
createRequestOptions := map[string]interface{}{"fileName": "Sample.docx",}
createRequest := &models.CreateDocumentRequest{
    Optionals: createRequestOptions,
}
_, _, _ = wordsApi.CreateDocument(ctx, createRequest)

Word Documents Embedding in a Web Page

Aspose.Words Cloud SDK for Go has included a very powerful features for embedding Word documents inside a web page using Go commands. It just needs a single line code to embed a Word processing documents inside a web browser. Once the document is rendered by the cloud services, it will be displayed on your web pages as a JavaScript widget. It is very easy to zoom in and out it online. It is also possible to display various Word file formats, such DOC, DOCX, RTF, and so on.

Iframe code Snippet Embed a DOCX Document into HTML

 
<iframe width="1120"
	height="850"
	src="https://api.aspose.cloud/words/view?foldername=sample&filename=SampleDocument.docx">
</iframe>

Word Documents Comparison inside Go Apps

Aspose.Words Cloud SDK for Go enables software developers to compare multiple Word processing documents and track the changes made to it inside Go applications. The library has included a powerful document manipulation tool that helps software developers to compare two Word documents and retrieve a list of differences between the two Word documents such as deleted text, added text, formatting change and so on.

How to Compare Word Documents via Go API

import (

"os"
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models")

config, _ := models.NewConfiguration("config.json")
wordsApi, ctx, _ := api.CreateWordsApi(config)
requestDocument, _ := os.Open("compareTestDoc1.doc")
requestCompareData := models.CompareData{
Author: ToStringPointer("author"),
ComparingWithDocument: ToStringPointer("TestCompareDocument2.doc"),
DateTime: ToTimePointer(CreateTime(2015, 10, 26, 0, 0, 0)),
}
requestComparingDocument, _ := os.Open("compareTestDoc2.doc")
compareRequestOptions := map[string]interface{}{"comparingDocument": requestComparingDocument,

"destFileName": "CompareDocumentOut.doc",}
compareRequest := &models.CompareDocumentOnlineRequest{
Document: requestDocument,
CompareData: &requestCompareData,
Optionals: compareRequestOptions,
}

_, _, _ = wordsApi.CompareDocumentOnline(ctx, compareRequest)

Manage Headers and Footers via Go API

Aspose.Words Cloud SDK for Go has included a very powerful feature for adding and managing headers and footers inside Word documents. The library supports several important features related headers and footers management, such as adding text or images to headers and footers, Delete a `HeaderFooter` object from a Word document online, get a Header/Footer in a Word document online, get a Header/Footer of a section, getting all headers/footers in a Word document, and many more. The following example demonstrates how to insert headers and footers in a Word documents.

Insert a HeaderFooter into a Word document via Go API

import (

"os"
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models")

config, _ := models.NewConfiguration("config.json")
wordsApi, ctx, _ := api.CreateWordsApi(config)
requestDocument, _ := os.Open("Sample.doc")
insertRequestOptions := map[string]interface{}{}
insertRequest := &models.InsertHeaderFooterOnlineRequest{
Document: requestDocument,
SectionPath: ToStringPointer(""),
HeaderFooterType: ToStringPointer("FooterEven"),
Optionals: insertRequestOptions,
}

_, _, _ = wordsApi.InsertHeaderFooterOnline(ctx, insertRequest)
 English