# Developer Guide The Developer Guide section explains all aspects of GroupDocs.Editor for Node.js via Java file editor features, provides code snippets, and examples of editing Microsoft Office formats programmatically in Node.js applications. {{< alert style="info" >}} This section describes some basic and advanced use cases of GroupDocs.Editor for Node.js via Java. Please refer to the [GitHub repository](https://github.com/groupdocs-editor/GroupDocs.Editor-for-Node.js-via-Java) for more examples and samples. {{< /alert >}} ## Introduction Welcome to the Developer Guide for **GroupDocs.Editor for Node.js via Java**. This guide is designed to help you understand and utilize the features of GroupDocs.Editor for editing documents programmatically in your Node.js applications. Whether you are working with Microsoft Office formats or other supported document types, this guide provides code snippets and examples to help you integrate GroupDocs.Editor into your projects. ## Getting Started To get started with GroupDocs.Editor for Node.js via Java, you need to install the package and set up your development environment. ### Installation You can install GroupDocs.Editor for Node.js via Java using npm: ```shell npm i @groupdocs/groupdocs.editor ``` ### Setting Up the Environment Ensure that you have Node.js and Java installed on your system. GroupDocs.Editor for Node.js via Java requires a Java runtime environment to function. ## Basic Usage Here is a simple example of how to load a document, edit it, and save it using GroupDocs.Editor for Node.js via Java. ```javascript // Import the necessary modules const fs = require('fs'); const groupdocsEditor = require('groupdocs-editor'); // Specify the input file path const inputFilePath = 'path/to/your/document.docx'; // Create a readable stream from the input file const inputStream = fs.createReadStream(inputFilePath); // Create load options (optional) const loadOptions = new groupdocsEditor.WordProcessingLoadOptions(); // Create an Editor instance const editor = new groupdocsEditor.Editor(inputStream, loadOptions); // Create edit options (optional) const editOptions = new groupdocsEditor.WordProcessingEditOptions(); // Edit the document const editableDocument = editor.edit(editOptions); // Get the HTML content const htmlContent = editableDocument.getContent(); // Perform your editing on the HTML content // For example, replace a word const editedHtmlContent = htmlContent.replace('Old Word', 'New Word'); // Create an EditableDocument from the edited HTML const updatedEditableDocument = groupdocsEditor.EditableDocument.fromMarkup(editedHtmlContent); // Create save options const saveOptions = new groupdocsEditor.WordProcessingSaveOptions(groupdocsEditor.WordProcessingFormats.Docx); // Specify the output file path const outputFilePath = 'path/to/your/output/document.docx'; // Save the edited document editor.save(updatedEditableDocument, outputFilePath, saveOptions); // Dispose of resources editableDocument.dispose(); updatedEditableDocument.dispose(); editor.dispose(); ``` ## Advanced Usage GroupDocs.Editor for Node.js via Java provides advanced features such as working with form fields, resources, and more. Refer to the specific articles in this guide for detailed explanations and code examples. ### Working with Form Fields - **[Working with Form Fields](https://docs.groupdocs.com/editor/nodejs-java/working-with-form-fields.md):** Learn how to load, edit, and read form fields in a Word document. ### Editing and Updating Form Fields - **[Edit and Update Form Fields](https://docs.groupdocs.com/editor/nodejs-java/edit-and-update-form-fields.md):** This article demonstrates how to edit form fields in a Word document. ### Fixing Invalid Form Fields - **[Fixing Invalid Form Fields](https://docs.groupdocs.com/editor/nodejs-java/fixing-invalid-form-fields.md):** Learn how to identify and fix invalid form fields in your documents. ### Working with Resources - **[Working with Resources](https://docs.groupdocs.com/editor/nodejs-java/working-with-resources.md):** Understand how to retrieve, adjust, and save resources like images, fonts, and stylesheets. ## Additional Resources - **GitHub Repository:** Explore more examples and source code in the [GroupDocs.Editor for Node.js via Java GitHub repository](https://github.com/groupdocs-editor/GroupDocs.Editor-for-Node.js-via-Java). - **API Reference:** Visit the [API Reference](https://reference.groupdocs.com/editor/nodejs-java/) for detailed information on classes and methods. - **Documentation:** Check the [official documentation](https://docs.groupdocs.com/editor/nodejsjava/) for comprehensive guides and tutorials. ## Conclusion GroupDocs.Editor for Node.js via Java is a powerful library that enables developers to programmatically edit documents within their Node.js applications. This Developer Guide provides you with the necessary information and examples to start integrating document editing features into your projects. For any questions or support, feel free to contact the [GroupDocs support team](https://forum.groupdocs.com/). --- **Note:** Be sure to replace `'path/to/your/document.docx'` and `'path/to/your/output/document.docx'` with the actual file paths in your application. --- By following this guide, you can effectively utilize the features of GroupDocs.Editor for Node.js via Java to edit and manipulate documents programmatically. For more examples and detailed information, you can refer to the [GroupDocs.Editor for Node.js via Java Examples](https://github.com/groupdocs-editor/GroupDocs.Editor-for-Node.js-via-Java) repository on GitHub. --- ## Contents - [Introduction](https://docs.groupdocs.com/editor/nodejs-java/introduction.md) - [Load Document](https://docs.groupdocs.com/editor/nodejs-java/load-document.md) - [Edit Document](https://docs.groupdocs.com/editor/nodejs-java/edit-document.md) - [Create New Document by Format](https://docs.groupdocs.com/editor/nodejs-java/create-document.md) - [Save Document](https://docs.groupdocs.com/editor/nodejs-java/save-document.md) - [Extracting Document Metainfo](https://docs.groupdocs.com/editor/nodejs-java/extracting-document-metainfo.md) - [How to Edit MOBI File](https://docs.groupdocs.com/editor/nodejs-java/how-to-edit-mobi-file.md) - [EditableDocument](https://docs.groupdocs.com/editor/nodejs-java/editabledocument.md) - [Field Management in GroupDocs.Editor for Node.js via Java](https://docs.groupdocs.com/editor/nodejs-java/form-field-management.md)