This page explains how to set up and run the code examples for GroupDocs.Merger.LowCode. The example repositories contain every code sample of this documentation as a runnable project, from the quick start to the detailed scenarios of each plugin.
Each example folder contains a complete, runnable project with its sample input files and a README. You can find the output files on the corresponding documentation page.
Running Individual Examples
1. Navigate to an example folder
cd ./Examples/developer-guide/using-join-pdf/BasicExample
2. Set the License
Open the Program.cs file using a text editor. You’ll find that license keys are read from environment variables:
// Load license keysvarpublicKey=Environment.GetEnvironmentVariable("GD_PUBLIC_KEY");varprivateKey=Environment.GetEnvironmentVariable("GD_PRIVATE_KEY");// Apply the licenseLicense.Set(publicKey,privateKey);
Set the environment variables, or replace the publicKey and privateKey values in the code with your license keys. When the variables are not set, License.Set throws an ArgumentNullException. To try an example without a license, remove the License.Set call: the example then runs in evaluation mode.
Note
Learn more about licensing, evaluation, and how to obtain a temporary license in the Licensing documentation topic.
To set environment variables, use the following commands in your shell:
The examples save their results to the output folder of the example folder. You can also find all the output files on the corresponding documentation page.
This code example produces business-plan-with-costs.pdf, a 19-page PDF document that should appear in the output folder.
Running All Examples
To build and run every example, set the license environment variables and run the script for your shell from the repository root:
run_all_examples.bat
.\run_all_examples.ps1
./run_all_examples.sh
The scripts report each example and print a summary at the end. They skip the examples that load a license file or keys from the code: the Licensing examples and the quick start. Put your license into the Program.cs file of those examples and run them individually.
Troubleshooting
If you encounter any issues while running the examples:
Common Issues
Build errors: Make sure the .NET 10 SDK is installed and the GroupDocs.Merger.LowCode package can be restored from NuGet
License errors: Check that the GD_PUBLIC_KEY and GD_PRIVATE_KEY environment variables hold your license keys
File not found errors: Make sure the sample input files are present in the example directory
Missing dependencies on Linux: The PPTX plugins need fontconfig and TrueType fonts; see System Requirements
Getting Help
Check the console output for specific error messages