How to Run Examples Leave feedback
On this page
The complete project GroupDocs.Total for Node.js via Java — Code Examples with runnable examples and sample files is hosted on GitHub. The structure and commands below are based on this repository and its README.
Before running examples, make sure your environment meets the System Requirements and Installation guides:
- Node.js: 20 LTS or later
- Java: JRE/JDK 8+ (17 LTS recommended)
- Java environment:
JAVA_HOMEset and added toPATH
Windows PowerShell:
$env:JAVA_HOME="C:\Program Files\Java\jdk-17"
$env:Path="$env:JAVA_HOME\bin;$env:Path"
Linux/macOS:
export JAVA_HOME=/usr/lib/jvm/java-17
export PATH=$JAVA_HOME/bin:$PATH
To get started, make sure that Node.js and Java are installed and configured as described above.
Clone the repository with examples
git clone [email protected]:groupdocs-total/GroupDocs.Total-for-Node.js-via-Java.gitNavigate to the
Examplesfoldercd ./GroupDocs.Total-for-Node.js-via-Java/ExamplesInstall dependencies
npm installThis pulls
@groupdocs/groupdocs.totalfrom npm. We typically keep the dependency on the latest published version; to use another version, change it inpackage.json.If installation fails with native build errors, review the build tools section in System Requirements.
Configure license (optional)
If you have a license file, you can set the license path in the
run_all_examples.jsfile. By default, the runner checks for theGROUPDOCS_LICENSE_PATH(orGROUPDOCS_LIC_PATH) environment variable or looks for files with the.licextension in theExamplesdirectory. You can also get a temporary license to test all the features.Without a license the APIs run in evaluation mode and add trial watermarks to output.
Run all examples
npm startList every example, then run one on its own:
node run_all_examples.js --list node run_all_examples.js --example ViewerRenderToHtmlYou can also run an individual example by navigating to the folder containing the example script and running it. Output files are placed in the same folder as the script file.
Find additional details and examples in the GroupDocs.Total for Node.js via Java documentation.
We also offer GroupDocs.Total packages for other platforms:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.