Overview
This page is an overview of Aspose.PDF for Node.js via C++ features.
Aspose.PDF for Node.js via C++ allows developers manipulate PDF files directly in Node.js environment. This Node.js Solution is built on the use of WebAssembly technology and is based on Aspose.PDF for .NET. You can easily use aspose-pdf for Node.js via C++ from and then follow the installation instructions.
About CJS and MJS file extensions
Node.js supports two modular systems for organizing and sharing code. There are:
- CommonJS Modules
- ECMAScript modules
The CommonJS modules were the classic dependency processing method in Node.js, while the ECMAScript modules are the newer add-on and follow the standard format used in modern browsers. ‘cjs’, ‘mjs’ - are extensions used to specify the module formats (CommonJS and ECMAScript Modules) used in JavaScript files.
In the code snippets, you will notice a difference in work with the AsposePDFforNode.js module. The primary distinction between ‘require’ and ‘import’ lies in their use cases. Require is limited to importing entire modules, whereas Import has the flexibility to import both entire modules and specific exports from those modules.
Two different approaches
JavaScript offers two approaches, ’then’ and ‘await’, for handling asynchronous operations.
The ’then’ method works with promises to manage both successful outcomes and errors in a sequential order. Conversely, ‘await’ makes JavaScript wait, literally suspending the function execution until that promise settles and returns its result.
The Aspose.PDF for Node.js supports a wide variety of functions such as:
- Set, Get, and Remove PDF File Information
- Delete Bookmarks
- Delete Annotations
- Extract a text from PDF
- Optimize PDF document
- Optimize resources
- Split PDF into two files.
- Merge two files to PDF
- Repair PDF
- Convertion features
In addition, Aspose.PDF for Node.js via C++ can be applied to easily convert PDF documents to various formats with high performance and perfect quality. See the section Aspose.PDF Supported File Formats. Also, this toolkit supports encrypting and decrypting PDF documents.
Learn more about: