Last active
May 15, 2023 14:59
-
-
Save aspose-words-cloud-gists/625ca80adffd779e8f6e3611551e14d5 to your computer and use it in GitHub Desktop.
This gist exceeds the recommended number of files (~10).
To access all files, please clone this gist.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist contains Golang code samples for Aspose.Words Cloud API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
acceptRequestOptions := map[string]interface{}{} | |
acceptRequest := &models.AcceptAllRevisionsRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: acceptRequestOptions, | |
} | |
_, _, _ = wordsApi.AcceptAllRevisions(ctx, acceptRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
acceptRequestOptions := map[string]interface{}{} | |
acceptRequest := &models.AcceptAllRevisionsOnlineRequest{ | |
Document: requestDocument, | |
Optionals: acceptRequestOptions, | |
} | |
_, _, _ = wordsApi.AcceptAllRevisionsOnline(ctx, acceptRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
remoteFileName:= "Sample.docx" | |
requestDocumentListDocumentEntries0FileReference := models.CreateRemoteFileReference(remoteFileName) | |
requestDocumentListDocumentEntries0 := models.DocumentEntry{ | |
FileReference: &requestDocumentListDocumentEntries0FileReference, | |
ImportFormatMode: ToStringPointer("KeepSourceFormatting"), | |
} | |
requestDocumentListDocumentEntries := []models.DocumentEntry{ | |
requestDocumentListDocumentEntries0, | |
} | |
requestDocumentList := models.DocumentEntryList{ | |
DocumentEntries: requestDocumentListDocumentEntries, | |
} | |
appendRequestOptions := map[string]interface{}{} | |
appendRequest := &models.AppendDocumentRequest{ | |
Name: ToStringPointer(remoteFileName), | |
DocumentList: &requestDocumentList, | |
Optionals: appendRequestOptions, | |
} | |
_, _, _ = wordsApi.AppendDocument(ctx, appendRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
localFile:= "Sample.docx" | |
requestDocument, _ := os.Open(localFile) | |
requestDocumentListDocumentEntries0FileReferenceStream := OpenFile(t, localFile) | |
requestDocumentListDocumentEntries0FileReference := models.CreateLocalFileReference(requestDocumentListDocumentEntries0FileReferenceStream) | |
requestDocumentListDocumentEntries0 := models.DocumentEntry{ | |
FileReference: &requestDocumentListDocumentEntries0FileReference, | |
ImportFormatMode: ToStringPointer("KeepSourceFormatting"), | |
} | |
requestDocumentListDocumentEntries := []models.DocumentEntry{ | |
requestDocumentListDocumentEntries0, | |
} | |
requestDocumentList := models.DocumentEntryList{ | |
DocumentEntries: requestDocumentListDocumentEntries, | |
} | |
appendRequestOptions := map[string]interface{}{} | |
appendRequest := &models.AppendDocumentOnlineRequest{ | |
Document: requestDocument, | |
DocumentList: &requestDocumentList, | |
Optionals: appendRequestOptions, | |
} | |
_, _, _ = wordsApi.AppendDocumentOnline(ctx, appendRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestStyleApply := models.StyleApply{ | |
StyleName: ToStringPointer("Heading 1"), | |
} | |
applyStyleRequestOptions := map[string]interface{}{} | |
applyStyleRequest := &models.ApplyStyleToDocumentElementRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
StyledNodePath: ToStringPointer("paragraphs/1/paragraphFormat"), | |
StyleApply: &requestStyleApply, | |
Optionals: applyStyleRequestOptions, | |
} | |
_, _, _ = wordsApi.ApplyStyleToDocumentElement(ctx, applyStyleRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestStyleApply := models.StyleApply{ | |
StyleName: ToStringPointer("Heading 1"), | |
} | |
applyStyleRequestOptions := map[string]interface{}{} | |
applyStyleRequest := &models.ApplyStyleToDocumentElementOnlineRequest{ | |
Document: requestDocument, | |
StyledNodePath: ToStringPointer("paragraphs/1/paragraphFormat"), | |
StyleApply: &requestStyleApply, | |
Optionals: applyStyleRequestOptions, | |
} | |
_, _, _ = wordsApi.ApplyStyleToDocumentElementOnline(ctx, applyStyleRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestReportEngineSettingsReportBuildOptions := []string{ | |
"AllowMissingMembers", | |
"RemoveEmptyParagraphs", | |
} | |
requestReportEngineSettings := models.ReportEngineSettings{ | |
DataSourceType: ToStringPointer("Json"), | |
ReportBuildOptions: requestReportEngineSettingsReportBuildOptions, | |
} | |
buildReportRequestOptions := map[string]interface{}{} | |
buildReportRequest := &models.BuildReportRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Data: ToStringPointer("Data.json"), | |
ReportEngineSettings: &requestReportEngineSettings, | |
Optionals: buildReportRequestOptions, | |
} | |
_, _, _ = wordsApi.BuildReport(ctx, buildReportRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestTemplate, _ := os.Open("Sample.docx") | |
requestReportEngineSettings := models.ReportEngineSettings{ | |
DataSourceType: ToStringPointer("Json"), | |
DataSourceName: ToStringPointer("persons"), | |
} | |
buildReportRequestOptions := map[string]interface{}{} | |
buildReportRequest := &models.BuildReportOnlineRequest{ | |
Template: requestTemplate, | |
Data: ToStringPointer("Data.json"), | |
ReportEngineSettings: &requestReportEngineSettings, | |
Optionals: buildReportRequestOptions, | |
} | |
_, _ = wordsApi.BuildReportOnline(ctx, buildReportRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
classifyRequestOptions := map[string]interface{}{"bestClassesCount": "3",} | |
classifyRequest := &models.ClassifyRequest{ | |
Text: ToStringPointer("Try text classification"), | |
Optionals: classifyRequestOptions, | |
} | |
_, _, _ = wordsApi.Classify(ctx, classifyRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
classifyRequestOptions := map[string]interface{}{"bestClassesCount": "3",} | |
classifyRequest := &models.ClassifyDocumentRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: classifyRequestOptions, | |
} | |
_, _, _ = wordsApi.ClassifyDocument(ctx, classifyRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
classifyRequestOptions := map[string]interface{}{"bestClassesCount": "3",} | |
classifyRequest := &models.ClassifyDocumentOnlineRequest{ | |
Document: requestDocument, | |
Optionals: classifyRequestOptions, | |
} | |
_, _, _ = wordsApi.ClassifyDocumentOnline(ctx, classifyRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestCompareData := models.CompareData{ | |
Author: ToStringPointer("author"), | |
ComparingWithDocument: ToStringPointer("TestCompareDocument2.doc"), | |
DateTime: ToTimePointer(CreateTime(2015, 10, 26, 0, 0, 0)), | |
} | |
compareRequestOptions := map[string]interface{}{"destFileName": "CompareDocumentOut.doc",} | |
compareRequest := &models.CompareDocumentRequest{ | |
Name: ToStringPointer("TestCompareDocument1.doc"), | |
CompareData: &requestCompareData, | |
Optionals: compareRequestOptions, | |
} | |
_, _, _ = wordsApi.CompareDocument(ctx, compareRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestCompressOptions := models.CompressOptions{ | |
} | |
compressDocumentOptions := map[string]interface{}{} | |
compressDocument := &models.CompressDocumentRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
CompressOptions: &requestCompressOptions, | |
Optionals: compressDocumentOptions, | |
} | |
_, _, _ = wordsApi.CompressDocument(ctx, compressDocument) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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("TestCompress.docx") | |
requestCompressOptions := models.CompressOptions{ | |
} | |
compressDocumentOnlineOptions := map[string]interface{}{} | |
compressDocumentOnline := &models.CompressDocumentOnlineRequest{ | |
Document: requestDocument, | |
CompressOptions: &requestCompressOptions, | |
Optionals: compressDocumentOnlineOptions, | |
} | |
_, _, _ = wordsApi.CompressDocumentOnline(ctx, compressDocumentOnline) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ClientId": "####-####-####-####-####", | |
"ClientSecret": "##################", | |
"BaseUrl": "https://api.aspose.cloud" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
convertRequestOptions := map[string]interface{}{} | |
convertRequest := &models.ConvertDocumentRequest{ | |
Document: requestDocument, | |
Format: ToStringPointer("pdf"), | |
Optionals: convertRequestOptions, | |
} | |
_, _ = wordsApi.ConvertDocument(ctx, convertRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
convertRequestOptions := map[string]interface{}{} | |
convertRequest := &models.ConvertDocumentRequest{ | |
Document: requestDocument, | |
Format: ToStringPointer("pdf"), | |
Optionals: convertRequestOptions, | |
} | |
_, _ = wordsApi.ConvertDocument(ctx, convertRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
convertRequestOptions := map[string]interface{}{} | |
convertRequest := &models.ConvertDocumentRequest{ | |
Document: requestDocument, | |
Format: ToStringPointer("pdf"), | |
Optionals: convertRequestOptions, | |
} | |
_, _ = wordsApi.ConvertDocument(ctx, convertRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
copyRequestOptions := map[string]interface{}{} | |
copyRequest := &models.CopyFileRequest{ | |
DestPath: ToStringPointer("Copy.docx"), | |
SrcPath: ToStringPointer("Sample.docx"), | |
Optionals: copyRequestOptions, | |
} | |
_, _ = wordsApi.CopyFile(ctx, copyRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
folderToCopy:= "/TestCopyFolder" | |
copyRequestOptions := map[string]interface{}{} | |
copyRequest := &models.CopyFolderRequest{ | |
DestPath: ToStringPointer(folderToCopy + "Dest"), | |
SrcPath: ToStringPointer(folderToCopy + "Src"), | |
Optionals: copyRequestOptions, | |
} | |
_, _ = wordsApi.CopyFolder(ctx, copyRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestStyleCopy := models.StyleCopy{ | |
StyleName: ToStringPointer("Heading 1"), | |
} | |
copyRequestOptions := map[string]interface{}{} | |
copyRequest := &models.CopyStyleRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
StyleCopy: &requestStyleCopy, | |
Optionals: copyRequestOptions, | |
} | |
_, _, _ = wordsApi.CopyStyle(ctx, copyRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestStyleCopy := models.StyleCopy{ | |
StyleName: ToStringPointer("Heading 1"), | |
} | |
copyRequestOptions := map[string]interface{}{} | |
copyRequest := &models.CopyStyleOnlineRequest{ | |
Document: requestDocument, | |
StyleCopy: &requestStyleCopy, | |
Optionals: copyRequestOptions, | |
} | |
_, _, _ = wordsApi.CopyStyleOnline(ctx, copyRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
copyRequestOptions := map[string]interface{}{} | |
copyRequest := &models.CopyStylesFromTemplateRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
TemplateName: ToStringPointer("StyleTemplate.docx"), | |
Optionals: copyRequestOptions, | |
} | |
_, _, _ = wordsApi.CopyStylesFromTemplate(ctx, copyRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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{}{} | |
createRequest := &models.CreateFolderRequest{ | |
Path: ToStringPointer("/TestCreateFolder"), | |
Optionals: createRequestOptions, | |
} | |
_, _ = wordsApi.CreateFolder(ctx, createRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestProperty := models.DocumentPropertyCreateOrUpdate{ | |
Value: ToStringPointer("John Doe"), | |
} | |
createRequestOptions := map[string]interface{}{} | |
createRequest := &models.CreateOrUpdateDocumentPropertyRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
PropertyName: ToStringPointer("AsposeAuthor"), | |
Property: &requestProperty, | |
Optionals: createRequestOptions, | |
} | |
_, _, _ = wordsApi.CreateOrUpdateDocumentProperty(ctx, createRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestProperty := models.DocumentPropertyCreateOrUpdate{ | |
Value: ToStringPointer("John Doe"), | |
} | |
createRequestOptions := map[string]interface{}{} | |
createRequest := &models.CreateOrUpdateDocumentPropertyOnlineRequest{ | |
Document: requestDocument, | |
PropertyName: ToStringPointer("AsposeAuthor"), | |
Property: &requestProperty, | |
Optionals: createRequestOptions, | |
} | |
_, _, _ = wordsApi.CreateOrUpdateDocumentPropertyOnline(ctx, createRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteAllParagraphTabStopsRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteAllParagraphTabStops(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteAllParagraphTabStopsOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteAllParagraphTabStopsOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteBookmarkRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
BookmarkName: ToStringPointer("aspose"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteBookmark(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteBookmarkOnlineRequest{ | |
Document: requestDocument, | |
BookmarkName: ToStringPointer("aspose"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteBookmarkOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteBookmarksRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteBookmarks(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteBookmarksOnlineRequest{ | |
Document: requestDocument, | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteBookmarksOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{"nodePath": "tables/1/rows/0/cells/0",} | |
deleteRequest := &models.DeleteBorderRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
BorderType: ToStringPointer("left"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteBorder(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{"nodePath": "tables/1/rows/0/cells/0",} | |
deleteRequest := &models.DeleteBorderOnlineRequest{ | |
Document: requestDocument, | |
BorderType: ToStringPointer("left"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteBorderOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{"nodePath": "tables/1/rows/0/cells/0",} | |
deleteRequest := &models.DeleteBordersRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteBorders(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{"nodePath": "tables/1/rows/0/cells/0",} | |
deleteRequest := &models.DeleteBordersOnlineRequest{ | |
Document: requestDocument, | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteBordersOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteCommentRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
CommentIndex: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteComment(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteCommentOnlineRequest{ | |
Document: requestDocument, | |
CommentIndex: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteCommentOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteCommentsRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteComments(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteCommentsOnlineRequest{ | |
Document: requestDocument, | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteCommentsOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteCustomXmlPartRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
CustomXmlPartIndex: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteCustomXmlPart(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteCustomXmlPartOnlineRequest{ | |
Document: requestDocument, | |
CustomXmlPartIndex: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteCustomXmlPartOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteCustomXmlPartsRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteCustomXmlParts(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteCustomXmlPartsOnlineRequest{ | |
Document: requestDocument, | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteCustomXmlPartsOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteDocumentPropertyRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
PropertyName: ToStringPointer("testProp"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteDocumentProperty(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteDocumentPropertyOnlineRequest{ | |
Document: requestDocument, | |
PropertyName: ToStringPointer("testProp"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteDocumentPropertyOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteDrawingObjectRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteDrawingObject(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteDrawingObjectOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteDrawingObjectOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteFieldRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteField(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{"nodePath": "sections/0/paragraphs/0",} | |
deleteRequest := &models.DeleteFieldOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteFieldOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteFieldsRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteFields(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteFieldsOnlineRequest{ | |
Document: requestDocument, | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteFieldsOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteFileRequest{ | |
Path: ToStringPointer("Sample.docx"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteFile(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteFolderRequest{ | |
Path: ToStringPointer(""), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteFolder(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteFootnoteRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteFootnote(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteFootnoteOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteFootnoteOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteFormFieldRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteFormField(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{"nodePath": "sections/0",} | |
deleteRequest := &models.DeleteFormFieldOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteFormFieldOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteMacrosRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteMacros(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteMacrosOnlineRequest{ | |
Document: requestDocument, | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteMacrosOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteOfficeMathObjectRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteOfficeMathObject(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteOfficeMathObjectOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteOfficeMathObjectOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteParagraphRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteParagraph(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteParagraphListFormatRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteParagraphListFormat(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteParagraphListFormatOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteParagraphListFormatOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteParagraphOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteParagraphOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteParagraphTabStopRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Position: ToFloat64Pointer(72.0), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteParagraphTabStop(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteParagraphTabStopOnlineRequest{ | |
Document: requestDocument, | |
Position: ToFloat64Pointer(72.0), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteParagraphTabStopOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteRunRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
ParagraphPath: ToStringPointer("paragraphs/1"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteRun(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteRunOnlineRequest{ | |
Document: requestDocument, | |
ParagraphPath: ToStringPointer("paragraphs/1"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteRunOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteSectionRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
SectionIndex: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteSection(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteSectionOnlineRequest{ | |
Document: requestDocument, | |
SectionIndex: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteSectionOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{"nodePath": "sections/0/body/paragraphs/0",} | |
deleteRequest := &models.DeleteStructuredDocumentTagRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteStructuredDocumentTag(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{"nodePath": "sections/0/body/paragraphs/0",} | |
deleteRequest := &models.DeleteStructuredDocumentTagOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteStructuredDocumentTagOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteTableRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Index: ToInt32Pointer(int32(1)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteTable(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteTableCellRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
TableRowPath: ToStringPointer("sections/0/tables/2/rows/0"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteTableCell(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteTableCellOnlineRequest{ | |
Document: requestDocument, | |
TableRowPath: ToStringPointer("sections/0/tables/2/rows/0"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteTableCellOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteTableOnlineRequest{ | |
Document: requestDocument, | |
Index: ToInt32Pointer(int32(1)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteTableOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteTableRowRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
TablePath: ToStringPointer("tables/1"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _ = wordsApi.DeleteTableRow(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteTableRowOnlineRequest{ | |
Document: requestDocument, | |
TablePath: ToStringPointer("tables/1"), | |
Index: ToInt32Pointer(int32(0)), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteTableRowOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteWatermarkRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteWatermark(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
deleteRequestOptions := map[string]interface{}{} | |
deleteRequest := &models.DeleteWatermarkOnlineRequest{ | |
Document: requestDocument, | |
Optionals: deleteRequestOptions, | |
} | |
_, _, _ = wordsApi.DeleteWatermarkOnline(ctx, deleteRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
downloadRequestOptions := map[string]interface{}{} | |
downloadRequest := &models.DownloadFileRequest{ | |
Path: ToStringPointer("Sample.docx"), | |
Optionals: downloadRequestOptions, | |
} | |
_, _ = wordsApi.DownloadFile(ctx, downloadRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestOptionsCurrentUser := models.UserInformation{ | |
Name: ToStringPointer("SdkTestUser"), | |
} | |
requestOptions := models.FieldOptions{ | |
CurrentUser: &requestOptionsCurrentUser, | |
} | |
mailMergeRequestOptions := map[string]interface{}{"data": ReadFile(t, "TestMailMergeData.xml"), | |
"options": &requestOptions,} | |
mailMergeRequest := &models.ExecuteMailMergeRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: mailMergeRequestOptions, | |
} | |
_, _, _ = wordsApi.ExecuteMailMerge(ctx, mailMergeRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
filePath := "SampleMailMergeTemplate.docx" | |
// Open template | |
file, err := os.Open(filePath) | |
if err != nil { | |
fmt.Println(err) | |
} | |
// Upload template | |
_, _, err1 := wordsApi.UploadFile(ctx, file, "SampleMailMergeTemplate.docx", nil) | |
if err1 != nil { | |
fmt.Println(err1) | |
} | |
var jsonStr = `{ | |
"storage": "First Storage", | |
"data": { | |
"root": { | |
"data": { | |
"format": "html", | |
"htmlText": "<html><head><style type="text/css">h2{color:green} .color_red{color:red} .color_green{color:green} .color_magenta{color:magenta} .color_olive{color:olive} .color_teal{color:teal}</style></head><body><h2>Table</h2><table border="2" cellspacing="0" cellpadding="4"><tr><th class="color_red">Column 1</th><th class="color_green">Column 2</th></tr><tr><td class="color_magenta">Value 1.1</td><td class="color_olive">Value 1.2</td></tr><tr><td class="color_teal">Value 2.1</td></tr></table><h2>Div</h2><div class="color_olive">Outer text<div class="color_magenta">Inner text</div>Outer text</div><h2>Image</h2><br/><img src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAADUUlEQVR42lWTWUwTURSGaUtIKY5QweISTUzceDGu0Rj1xURjTNQEE+ODGn0hPhBEQdqZztahBbrAtFih1Fprh9IBiVLLErZSU7BUoS7VqNH44ovx0S0ovdfO4Ez04cw9Ofec7/5zzr15NEnkUxSVFx8ObZ1x7nzHN6z9nOhnzOFwWCnECcKoEFbBRrrp6iF/XRvD0BoplkdTuAiIhtt3P3Fu+jJlKlkM1WoXLFjVeSnpXrC94gV3ciJp1X0L1K7+NtDfvXdpj1TmmUwm8QTfLa867T+ceWTSwO5r5b87XNaDEoBrv3p2Ai+AU1Qh5OiDGS4UXi4roAisQHBiYfJS2obAVPMyELYcGxViOIaKcLaNLXzadej5nBUBPXW6hdYW0z4RQOYUXK2tUfr8QeXL0Kn4JKEBk7QWdtrrLggJJEmoCBxVCf50qIaaa0HABFkEPZaLNnGfwPNFGV0u05Y554bvMQoBPLbxs9t9QydJpHP/KayRbsf+pG1NdgTTgDuGXa8dbS41ZtArxaQYT1WlHVqYaloGOcvJIan4X2MdViTl3vExbS+GPfXlvzzutj1LPch9HrYea59t0YIRtAAO+PQuIWYwNKikYty41Iuk/3TvMzsCB9HcQR7msgzgjZs7Z5rLQPR6PojeJW2d3oDCoG/IlwAYqlexbp/i9eB19ziuBoMoAlrR03YZ0G8+0JFhS8EjuhD6zWfuCTEjppcBOKYX1bwaqA5MM2oYZ4pBy7XjrAyY7sPqU01FcNZW/jtwZeXXVpt5u1RM4JhYzHFBddqz5/28fUU2NwngtVUbZUCE79o6x67/MYiXLiSbS8D9xp1vI7znkLvDK07A5/MiT7mzdxMMAsdMqxaiWDHkgzePigBUXy9KTfdWeVKNSjjPrvv5uKkYxszlIHX7eDLeVfkgbt30bt5eAlOOtT9nLRrI03szrOumOtcb4SrTSj2KKfr4nuUZ7kR8HFPAYXLlYqxRl43TGjjTWAhHCC1MNK/+lWA0cJLRgfsh95G/N1H136z7+BCSuHMuMEGVLo4a1XCKKcuO0WXZBw1FcNighmPWbe8jIeeJpdFiCrkHguWUyM92NBKseBut8T92bfsw66z49IyrHH2T5CvlqeCYUvL/ANIZ7+ohXSdWAAAAAElFTkSuQmCC"></body></html>" | |
} | |
} | |
}, | |
"destFileName": "Out_SampleMailMergeTemplate.docx" | |
}` | |
// Populate map[string]interface{} | |
jsonMap := make(map[string]interface{}) | |
json.Unmarshal([]byte(jsonStr), &jsonMap) | |
// Populate mail merge template (The output doc will be saved in cloud storage) | |
_, response, _ := wordsApi.ExecuteMailMerge(ctx, "SampleMailMergeTemplate.docx", jsonMap) | |
fmt.Println(response.Status) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
filePath := "SampleMailMergeTemplate.docx" | |
// Open template | |
file, err := os.Open(filePath) | |
if err != nil { | |
fmt.Println(err) | |
} | |
// Upload template | |
_, _, err1 := wordsApi.UploadFile(ctx, file, "SampleMailMergeTemplate.docx", nil) | |
if err1 != nil { | |
fmt.Println(err1) | |
} | |
var jsonStr = `{ | |
"storage":"First Storage", | |
"data": "<Fields><FullName>abc user</FullName><Company>Aspose Pty Ltd</Company><Address>Suite 163</Address><Address2>79 Longueville Road</Address2><City>Lane Cove</City></Fields>", | |
"loadEncoding":"utf8", | |
"destFileName":"Out_SampleMailMergeTemplate.docx" | |
}` | |
// Populate map[string]interface{} | |
jsonMap := make(map[string]interface{}) | |
json.Unmarshal([]byte(jsonStr), &jsonMap) | |
// Convert Document to html (The output doc will be saved in cloud storage) | |
_, response, _ := wordsApi.ExecuteMailMerge(ctx, "SampleMailMergeTemplate.docx", jsonMap) | |
fmt.Println(response.Status) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestTemplate, _ := os.Open("Sample.docx") | |
requestData, _ := os.Open(ReadFile(t, "TestMailMergeData.xml")) | |
requestOptionsCurrentUser := models.UserInformation{ | |
Name: ToStringPointer("SdkTestUser"), | |
} | |
requestOptions := models.FieldOptions{ | |
CurrentUser: &requestOptionsCurrentUser, | |
} | |
mailMergeRequestOptions := map[string]interface{}{"options": &requestOptions,} | |
mailMergeRequest := &models.ExecuteMailMergeOnlineRequest{ | |
Template: requestTemplate, | |
Data: requestData, | |
Optionals: mailMergeRequestOptions, | |
} | |
_, _ = wordsApi.ExecuteMailMergeOnline(ctx, mailMergeRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestTemplate, _ := os.Open("TestMailMergeWithImages.doc") | |
requestData, _ := os.Open("MailMergeData.json") | |
mailMergeRequestOptions := map[string]interface{}{"documentFileName": "Out_TestMailMergeWithImages.doc",} | |
mailMergeRequest := &models.ExecuteMailMergeOnlineRequest{ | |
Template: requestTemplate, | |
Data: requestData, | |
Optionals: mailMergeRequestOptions, | |
} | |
_, _ = wordsApi.ExecuteMailMergeOnline(ctx, mailMergeRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestTemplate, _ := os.Open("template.doc") | |
requestData, _ := os.Open("TestPostDocumentExecuteMailMerge.txt") | |
mailMergeRequestOptions := map[string]interface{}{"documentFileName": "Out_PostDocumentExecuteMailMergeWithHTMLData.docx",} | |
mailMergeRequest := &models.ExecuteMailMergeOnlineRequest{ | |
Template: requestTemplate, | |
Data: requestData, | |
Optionals: mailMergeRequestOptions, | |
} | |
_, _ = wordsApi.ExecuteMailMergeOnline(ctx, mailMergeRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestTemplate, _ := os.Open("SampleMailMergeTemplate.docx") | |
requestData, _ := os.Open("SampleMailMergeTemplateData.xml") | |
mailMergeRequestOptions := map[string]interface{}{"documentFileName": "Out_SampleMailMergeTemplate.docx",} | |
mailMergeRequest := &models.ExecuteMailMergeOnlineRequest{ | |
Template: requestTemplate, | |
Data: requestData, | |
Optionals: mailMergeRequestOptions, | |
} | |
_, _ = wordsApi.ExecuteMailMergeOnline(ctx, mailMergeRequest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestOptions := map[string]interface{}{} | |
request := &models.GetAvailableFontsRequest{ | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetAvailableFonts(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestOptions := map[string]interface{}{} | |
request := &models.GetBookmarkByNameRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
BookmarkName: ToStringPointer("aspose"), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetBookmarkByName(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestOptions := map[string]interface{}{} | |
request := &models.GetBookmarkByNameOnlineRequest{ | |
Document: requestDocument, | |
BookmarkName: ToStringPointer("aspose"), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetBookmarkByNameOnline(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestOptions := map[string]interface{}{} | |
request := &models.GetBookmarksRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetBookmarks(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestOptions := map[string]interface{}{} | |
request := &models.GetBookmarksOnlineRequest{ | |
Document: requestDocument, | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetBookmarksOnline(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestOptions := map[string]interface{}{"nodePath": "tables/1/rows/0/cells/0",} | |
request := &models.GetBorderRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
BorderType: ToStringPointer("left"), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetBorder(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestOptions := map[string]interface{}{"nodePath": "tables/1/rows/0/cells/0",} | |
request := &models.GetBorderOnlineRequest{ | |
Document: requestDocument, | |
BorderType: ToStringPointer("left"), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetBorderOnline(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestOptions := map[string]interface{}{"nodePath": "tables/1/rows/0/cells/0",} | |
request := &models.GetBordersRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetBorders(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestOptions := map[string]interface{}{"nodePath": "tables/1/rows/0/cells/0",} | |
request := &models.GetBordersOnlineRequest{ | |
Document: requestDocument, | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetBordersOnline(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestOptions := map[string]interface{}{} | |
request := &models.GetCommentRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
CommentIndex: ToInt32Pointer(int32(0)), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetComment(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestOptions := map[string]interface{}{} | |
request := &models.GetCommentOnlineRequest{ | |
Document: requestDocument, | |
CommentIndex: ToInt32Pointer(int32(0)), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetCommentOnline(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestOptions := map[string]interface{}{} | |
request := &models.GetCommentsRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetComments(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestOptions := map[string]interface{}{} | |
request := &models.GetCommentsOnlineRequest{ | |
Document: requestDocument, | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetCommentsOnline(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"os" | |
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models") | |
config, _ := models.NewConfiguration("config.json") | |
wordsApi, ctx, _ := api.CreateWordsApi(config) | |
requestOptions := map[string]interface{}{} | |
request := &models.GetCustomXmlPartRequest{ | |
Name: ToStringPointer("Sample.docx"), | |
CustomXmlPartIndex: ToInt32Pointer(int32(0)), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetCustomXmlPart(ctx, request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.docx") | |
requestOptions := map[string]interface{}{} | |
request := &models.GetCustomXmlPartOnlineRequest{ | |
Document: requestDocument, | |
CustomXmlPartIndex: ToInt32Pointer(int32(0)), | |
Optionals: requestOptions, | |
} | |
_, _, _ = wordsApi.GetCustomXmlPartOnline(ctx, request) |