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, print & convert Word processing documents (DOC, DOCX, RTF, HTML, PDF, XPS, EPUB).

Aspose.Words Cloud SDK for Go is a powerful and multipurpose Go library that allows software developers to work with Microsoft Word documents in the cloud. Whether software developers need to create, manipulate, convert, or extract data from Word files, the SDK is a great choice that can help them get the job done quickly and efficiently. The library has included support for numerous word processing, OpenOffice, WordprocessingML, and web file formats such as DOC, DOCX, RTF, DOT, DOTX, DOTM, FlatOPC (XML).

Aspose.Words Cloud SDK for Go offers a wide range of features and benefits that makes it a valuable tool for developers, some of these features include creating new Word documents from scratch, applying a variety of formatting options and styles, Word documents conversion to other file formats, extracting images from Word documents, images text from Word files, merging multiple Word documents, splitting Word documents into multiple documents, inserting or removing content from specific sections and many more.

Aspose.Words Cloud SDK for Go can work with Word documents in a flexible and efficient way. The library enables software developers to convert their word processing documents to different leading file formats such as DOC, DOT, DOCX, DOCM, DOTX, DOTM, FlatOpc, RTF, PDF, HTML, ODT, OTT, TXT, EPUB, XPS, PCL, TIFF, PNG, JPEG, BMP, SVG and many more. With its wide range of features and benefits, Aspose.Words Cloud SDK is a great tool for developers who need to work with Word files on a regular basis.

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