Aspose.Words  Cloud SDK for Node.js

Work with Word Documents in Node.js

Open, create, edit, merge, split, compare and convert a Word document in Node.js

Get Started
  
 

Open, create, edit, merge, split, compare and convert a Word document in Node.js. It's easy for Node.js developers to manipulate Microsoft Word documents. Aspose.Words Cloud Node.js package is a fast, easy and powerful conversion library to convert files including PDF to Word and Word to PDF. It can generate a converted document according to the targeted file format specifications.

Note: API works on any environment that supports Node.js including Linux, Windows and OSX.

Advanced Word Document Processing Features

Merge multiple Word documents

Split all or specific pages of a Word document

Convert Word documents to different formats

Manipulate document properties

Execute simple to complex mail merge

Execute mail merge template

Insert scaled images on merge fields

Insert a page number field into Word documents

Insert or edit watermark in Word documents

Find or replace text in Word documents

Password protect Word documents or update document protection

Load & convert PDF documents to Word formats including DOC & DOCX

Word Cloud Features for C#

  • Open, create and edit paragraphs and text.
  • Open, create and edit images, text boxes and shapes.
  • Open, create and edit tables including rows and cells.
  • Open, create and edit fields, form fields, hyperlinks and bookmarks.
  • Open, create and edit document sections, headers and footers.
  • Open, create and edit footnotes, endnotes and comments.
  • Convert documents between several popular file formats.
  • Load and save HTML/XHTML.
  • Render individual shapes from a document into raster or vector images.
  • Add and update all character formatting including fonts, colors, effects, borders, shading, etc.

Supported Features to Edit Documents in Node.js

There are different tasks which you can perform using API to manipulate data and files such as:

  • Split a Word document into multiple smaller files, or to extract pages to a new file.
  • Create a Word document with Node.js.
  • Read data from a Word document using Node.js.
  • Extract content from Word files in Node.js.
  • Extract data from tables in a Word document.

Edit and Convert Word Documents in the Cloud

Node.js API allows you to edit a word document and apply the following:

  • Insert a table.
  • Add paragraphs.
  • Extract text.
  • Insert an image.
  • Insert a watermark image.
  • Get hyperlinks.
  • Add a header or a footer.

You can export a Word document into the specified format and make several conversion tasks for different file formats in Node.js such as:

  • Convert Word to PDF.
  • Convert Word to TXT.
  • Convert HTML to PDF
  • Convert DOCX to PNG.
  • Convert Word to EPUB.

Note: Check our free online converter.

Compare Word Documents with Node.js

Node.js API allows you to recognize differences between two versions of a Word document. It helps in avoiding the long process of comparing text in two documents line by line. It accurately identifies important changes to text without additional conversion steps, even if the versions of the document are in different formats such as DOCX, PDF or image files.

Note: Check our document comparison online.

Work with Word Document Paragraphs

You can work with paragraphs in Node.js and apply many operations such as:

  • Get all paragraphs that are included in a document or in a section.
  • Add space before and space after a paragraph.
  • Use line spacing to set the amount of space between lines within a paragraph.
  • Set first-line indent to the left side of the first line of a paragraph.
  • Choose between several types of alignment such as Centered, Left-Justified and Right-Justified.
  • Keep text together by using KeepTogether and KeepWithNext properties.

Work with Word Document Sections

  • Insert, delete or update a section break.
  • Add section content.
  • Copy sections between documents.
  • Get a list of sections or a particular section from a Word document.
  • Read or update page setup of a section.

Convert PDF to Word in Node.js

The following code sample shows how to convert PDF to DOCX in the Cloud and save the result to a local file:

Convert Word documents to PDF - Node.js

const { WordsApi, ConvertDocumentRequest } = require("asposewordscloud");
const fs = require('fs');

var appSid = "####-####-####-####-####";
var appKey = "##################";

var wordsApi = new WordsApi(appSid, appKey);

var fileName = "sample.pdf";
var request = new ConvertDocumentRequest({
	format: "docx",
	document: fs.readFileSync(fileName),
});

wordsApi.convertDocument(request).then((result) => {
	fs.writeFile('sample.docx', result.body, (err) => {
		if (err) throw err;
		console.log('Successfully converted');
	});
}).catch(function(err) {
	console.log('Error:', err);
});

How to open and edit a DOCX document in Nodejs

  1. Install Nodejs package.
  2. Go to the Aspose Cloud Dashboard.
  3. Create a new Account to access all applications and services or Sign In to your existing account.
  4. Click on Applications in the left menu to get Client Id and Client Secret.
  5. Upload a DOCX file to the Cloud Storage or use directly in the request body.
  6. Check Developer Guide to edit a DOCX file in Node.js.
  

Support and Learning Resources