Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/aspose-words-cloud/aspose-words-cloud-go/v2102
Aspose.Wors Cloud SDK for Go wraps Aspose.Words REST API so you could seamlessly integrate Microsoft Word® document generation, manipulation, conversion & inspection features into your own Go applications.
Aspose.Words Cloud SDK for Go allows to work with document headers, footers, page numbering, tables, sections, document comments, drawing objects, FormFields, fonts, hyperlinks, ranges, paragraphs, math objects, watermarks, track changes and document protection. It also assists in appending documents, splitting documents as well as converting document to other supported file formats.
Feel free to explore the Developer's Guide & API Reference to know all about Aspose.Words Cloud API.
Microsoft Word: DOC, DOCX, RTF, DOT, DOTX, DOTM, FlatOPC (XML) OpenOffice: ODT, OTT WordprocessingML: XML Web: HTML, MHTML, HtmlFixed Text: TXT Fixed Layout: PDF
Fixed Layout: PDF/A, XPS, OpenXPS, PS Images: JPEG, PNG, BMP, SVG, TIFF, EMF Others: PCL
Firstly, create an account at Aspose for Cloud to get your application information and free quota to use the API.
From Visual Stuio Code:
Add "github.com/aspose-words-cloud/aspose-words-cloud-go/v2102/api" and "github.com/aspose-words-cloud/aspose-words-cloud-go/v2102/api/models" in the import section of your code
From the command line:
go get -v github.com/aspose-words-cloud/aspose-words-cloud-go/v2102/api
The complete source code is available at GitHub Repository.
The libraray doesn't uses any non-Google Golang packages.
The examples below show how your application have to initiate and get a text of the first paragraph using Aspose.Words-Cloud library:
Config.json file:
{
"ClientId": "your client id",
"ClientSecret": "your client secret",
"BaseUrl": "https://api.aspose.cloud"
}
Go code:
// Start README example
// init words cloud api
config, _ := models.NewConfiguration(configFilePath)
wordsApi, ctx, _ := api.CreateWordsApi(config)
// upload test.docx to a cloud
// remote.docx is a name in the cloud
file, _ := os.Open(localFilePath)
uploadRequest := &models.UploadFileRequest{
FileContent: file,
Path: &remotePath,
}
wordsApi.UploadFile(ctx, uploadRequest)
// get a text for the first paragraph of the first section
options := map[string]interface{}{
"folder": remoteFolder,
}
request := &models.GetParagraphsRequest{
Name: &remoteName,
Optionals: options,
}
result, _, _ := wordsApi.GetParagraphs(ctx, request)
fmt.Println(result.Paragraphs.ParagraphLinkList[0].Text)
// End README example
Product Page | Documentation | API Reference | Code Samples | Blog | Free Support | Free Trial
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.