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.
Document Properties, Protection, Tracking of Changes
Watermarks
Create, Merge & Split Documents
Compare & Render Documents
Convert with a high quality rendering. 20+ document formats are supported
Headers, Footers & Sections
Text Search & Replace
Paragraphs
Fields
Form Fields
MailMerge and Report Generation
Files & Storage, Ranges, Drawing Objects
Plugins for WordPress, SalesForce, Dynamics CRM & Drupal
Node.js 4.8.7 or higher
You can both read and write documents in: DOCX, DOC, PDF, MD, RTF, DOCM, DOTX, DOT, DOTM, ODT, OTT, XML, HTML, MHTML, XHTML, TXT.
The write-only formats are: XPS, OpenXPS, PS, JPEG, PNG, BMP, SVG, TIFF, EMF, PCL, EPUB.
The read-only formats are: MOBI, CHM.
For more details, please check Supported File Formats.
There are different tasks which you can perform using API to manipulate data and files such as:
Node.js API allows you to edit a word document and apply the following:
You can export a Word document into the specified format and make several conversion tasks for different file formats in Node.js such as:
Note: Check our free online converter.
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.
You can work with paragraphs in Node.js and apply many operations such as:
You can create section/chapter, headers and footers in a Word document using node.js. Sections are the Word feature that controls page number formatting, headers and footers, orientation (portrait/landscape), margins and columns.
Section break usually is placed after the title page, copyright page, dedication page, table of contents, chapter 1, chapter 2, and so on. These section breaks will create a page break between each of those sections.
Using our Node.js library, you can perform the following operations on sections:
The following code sample shows how to convert PDF to DOCX in the Cloud and save the result to a local file:
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);
});