---
description: Node.js via Java project guidance
globs: "**/*.js, **/*.cjs, **/*.mjs, **/*.ts"
alwaysApply: false
---

# Aspose.Slides for Node.js via Java

Use these instructions for this platform only. Read the project's existing instructions and dependency files first. Keep its current package version unless the task requires a change. Confirm API names against this platform's documentation; bindings are not interchangeable.

## Setup

Use `aspose.slides.via.java` with the JDK and native build tools in the installation guide. Import the package with CommonJS `require`. This binding uses Java-style accessors such as `getSlides`; do not copy the Node.js via .NET API. Dispose each presentation. The JVM can keep a command-line process alive; follow the guide's standalone-program shutdown instructions without forcing a server to exit.

## Install for a local test

From a new npm project with the documented Java and native build prerequisites available, install the verified version:

```sh
npm install aspose.slides.via.java@26.11.0
```

These pinned versions reproduce the example below. Preserve an existing project's dependency choices unless the user asks to change them.

## Minimal example

After installation, run this standalone program as `starter.cjs` from your project folder. It creates `hello.pptx`. Use a scratch project so an existing file is not replaced.

```javascript
const slides = require("aspose.slides.via.java");

const presentation = new slides.Presentation();
try {
    const shape = presentation.getSlides().get_Item(0).getShapes().addAutoShape(
        slides.ShapeType.Rectangle, 50, 50, 500, 80
    );
    shape.getTextFrame().setText("Hello, Aspose.Slides!");
    presentation.save("hello.pptx", slides.SaveFormat.Pptx);
} finally {
    presentation.dispose();
}
// This is a standalone command-line program.
process.exit(0);
```

Verified on 2026-11-18: Windows x64, Node.js 22.23.5, JDK 21, aspose.slides.via.java 26.11.0. The program ran and the saved file contained one slide with the expected text. This evaluation-mode check does not prove licensed output or other operating systems.

## License

Evaluation mode is suitable for a local smoke test and can add watermarks or other limits. If the user supplies a valid license, follow the [licensing guide](https://docs.aspose.com/slides/nodejs-java/licensing/) before creating presentations. Read the license from a private local location accessible to the process. Never put license contents, keys, or personal paths in instructions, source control, or logs.

## Verify the change

Before expanding a change, create a small presentation, save it to a new file, and open the result. Check the requested content, slide count, and formatting. Build and run the exact code against the installed package; report any missing runtime or dependency instead of claiming it was tested.

Keep input files local unless the user permits sharing them. Write output to a new file and preserve the original. Report what ran, the versions used, and any checks that remain.

## Sources

- [Documentation](https://docs.aspose.com/slides/nodejs-java/)
- [API reference](https://reference.aspose.com/slides/nodejs-java/)
- [Installation](https://docs.aspose.com/slides/nodejs-java/installation/)
- [Licensing](https://docs.aspose.com/slides/nodejs-java/licensing/)
