Introduction to NodeJS
Node.js is a JavaScript platform for building fast, scalable network applications. Node.js follows an event-driven, non-blocking I/O model which makes it efficient and lightweight. An ideal platform for data-intensive real-time applications. Node.js is server-side solution for JavaScript, and in particular for receiving and responding to HTTP requests. Read more about Node.js.
Aspose Cloud SDK for NodeJS
We are pleased to announce the release of Aspose Cloud SDK for Node.js as per Aspose Cloud 1.1.7.1. With this new release it is possible to create, read, manipulate and export features are greatly improved. You can extract sections, paragraphs, runs, page setup and fonts and update page setup and font in a Word document. read more
New Aspose.Words Methods
As per the latest version of Aspose Cloud 1.1.7.1, we’ve implemented the following functions to the Aspose Cloud Node.js SDK:
- Save Word documents as other formats – This feature allows you to save Word documents as DOC, DOCX, DOCM, DOT, DOTX, DOTM, OOXML, HTML, HTMLFixed, WordML, MHTML, ODT, PDF, XPS, TIFF, EPUB, image and several other formats. Now this feature also supports export to XAML_FIXED format. You can use saveAs “Aspose.Cells Cloud”) resource and send a POST request (specifying save options in the request body) to convert to any supported format.
- Split Word documents – This feature allows you to split all or specific pages of a Word document to many formats. This feature was already supported but now it supports split to XAML_FIXED format. You can use splitDocument resource and send a POST request to split to any supported format.
- Get all sections – This feature allows you to get a list of all sections present in a Word document. You can use sections resource and send a GET request to get this list.
- Get a specific section – This feature allows you to get any section from a Word document. You can use section resource and send a GET request to get a section.
- Get all paragraphs – This feature allows you to get a list of all paragraphs present in a Word document. You can use paragraphs resource and send a GET request to get this list.
- Get a specific paragraph – This feature allows you to get any paragraph from a Word document. You can use paragraph resource and send a GET request to get a paragraph.
- Get a specific run – This feature allows you to get any run of any paragraph from a Word document. You can use run resource and send a GET request to get a run.
- Get font information – This feature allows you to get font information from any run of a paragraph. You can use font resource and send a GET request for this purpose.
- Update a run’s font – This feature allows you to update font of any run in a Word document. You can use font resource and send a POST request (specifying font options in the request body) to update font.
- Get page setup information – This feature allows you to get page setup information from any section of a Word document. You can use pageSetup resource and send a GET request for this purpose.
- Update page setup – This feature allows you to update page setup of any section in a Word document. You can use pageSetup resource and send a POST request (specifying page setup options in the request body) to update page setup.
- Get mustache field names – This feature allows you to get mail merge and mustache field names. You can use mailMergeFieldNames resource and send a GET request (passing useNonMergeFields parameter in the request URI) to get all merge fields including mustache fields.
Code Snippets
Sample Code Aspose.Words - Get Sections
require 'asposecloud'
var AppSID = '****';
var AppKey = '****';
var BaseProductUri = 'https://api.aspose.cloud/v3.0/';
var config = {'appSID':AppSID,'appKey':AppKey,'baseURI':BaseProductUri};
var aspose = new AsposeCloud(config);
var stg = aspose.Storage();
stg.uploadFile('test_multi_pages.docx');
var words = aspose.Words();
words.getSections('test_multi_pages.docx', function(data){ console.log(data); });
Sample Code Aspose.Words - Get Paragraphs
require 'asposecloud'
var AppSID = '****';
var AppKey = '****';
var BaseProductUri = 'https://api.aspose.cloud/v3.0/';
var config = {'appSID':AppSID,'appKey':AppKey,'baseURI':BaseProductUri};
var aspose = new AsposeCloud(config);
var stg = aspose.Storage();
stg.uploadFile('test_multi_pages.docx');
var words = aspose.Words();
words.getParagraphs('test_multi_pages.docx', function(data){ console.log(data); });
Download and Install
- You can download Node.js from Node.js
- Aspose Cloud SDK node package is available on Node Package Manager: https://npmjs.org/package/asposecloud
Start a Free Trial Today
Start a free trial today - all you need is to sign up with Aspose Cloud service. Once you have signed up, you are ready to try powerful file processing features offered by Aspose Cloud.