1. Home
  2. /
  3. GroupDocs.Merger.LowCode
  4. /
  5. Getting Started
  6. /
  7. Running Examples

Running Examples

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.

Prerequisites

Before running the examples, make sure you have:

  1. Configured your environment as described in the System Requirements topic.
  2. Installed the .NET 10 SDK: the example projects target net10.0.
  3. Downloaded one of the repositories with code examples:
Note
This guide demonstrates how to run examples in C#, but the process is similar for VB.NET and F# examples.

Project Structure

The example repository is structured similarly to this documentation, making it easy to find the code examples and related input documents.

groupdocs-merger-lowcode-examples-csharp/
├── 📂 Examples/
│   ├── 📂 licensing/
│   │   ├── 📂 SetLicenseFromFile/
│   │   └── 📂 SetLicenseKeys/
│   ├── 📂 getting-started/
│   │   └── 📂 quick-start-guide/
│   │       └── 📂 AddCodeToMergePdfFiles/
│   └── 📂 developer-guide/
│       ├── 📂 handling-errors/
│       │   ├── 📂 HandleAnUnsupportedInputFormat/
│       │   └── 📂 HandleInvalidPageNumbers/
│       ├── 📂 loading-source-documents/
│       │   ├── 📂 LoadADocumentFromAFilePath/
│       │   ├── 📂 LoadADocumentFromAStream/
│       │   └── 📂 MergeDocumentsWithASourceStream/
│       ├── 📂 saving-output-documents/
│       │   ├── 📂 AddThePartNumberToTheFileName/
│       │   ├── 📂 SaveADocumentToAFile/
│       │   └── 📂 UseAFileNameTemplate/
│       ├── 📂 using-join-docx/
│       │   ├── 📂 BasicExample/
│       │   ├── 📂 MergeDocxDocumentsFromAStream/
│       │   └── 📂 MergeMultipleDocxDocuments/
│       ├── 📂 using-join-pdf/
│       │   ├── 📂 BasicExample/
│       │   ├── 📂 MergeMultiplePdfDocuments/
│       │   └── 📂 MergePdfDocumentsFromAStream/
│       ├── 📂 using-join-pptx/
│       │   ├── 📂 BasicExample/
│       │   └── 📂 MergePptxDocumentsFromAStream/
│       ├── 📂 using-remove-pages-pdf/
│       │   ├── 📂 RemoveARangeOfPages/
│       │   ├── 📂 RemoveOddOrEvenPagesOfARange/
│       │   ├── 📂 RemovePagesFromAStream/
│       │   └── 📂 RemoveSpecificPages/
│       ├── 📂 using-split-docx/
│       │   ├── 📂 SplitADocumentIntoPartsAtSpecificPages/
│       │   ├── 📂 SplitARangeOfPages/
│       │   ├── 📂 SplitOddOrEvenPagesOfARange/
│       │   └── 📂 SplitSpecificPagesIntoSeparateDocuments/
│       ├── 📂 using-split-pdf/
│       │   ├── 📂 NameThePartsWithAFileNameTemplate/
│       │   ├── 📂 SplitADocumentFromAStream/
│       │   ├── 📂 SplitADocumentIntoPartsAtSpecificPages/
│       │   ├── 📂 SplitARangeOfPages/
│       │   ├── 📂 SplitOddOrEvenPagesOfARange/
│       │   └── 📂 SplitSpecificPagesIntoSeparateDocuments/
│       ├── 📂 using-split-pptx/
│       │   ├── 📂 SplitADocumentIntoPartsAtSpecificSlides/
│       │   ├── 📂 SplitARangeOfSlides/
│       │   ├── 📂 SplitOddOrEvenSlidesOfARange/
│       │   └── 📂 SplitSpecificSlidesIntoSeparateDocuments/
│       └── 📂 CopyTheCodeExample/
├── 📄 GroupDocs.Merger.LowCode.Examples.sln
├── 📄 LICENSE
├── 📄 README.md
├── 🚀 run_all_examples.bat
├── 🚀 run_all_examples.ps1
└── 🚀 run_all_examples.sh
Tip
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 keys
var publicKey = Environment.GetEnvironmentVariable("GD_PUBLIC_KEY");
var privateKey = Environment.GetEnvironmentVariable("GD_PRIVATE_KEY");

// Apply the license
License.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:

set GD_PUBLIC_KEY=your_public_key
set GD_PRIVATE_KEY=your_private_key
$env:GD_PUBLIC_KEY = "your_public_key"
$env:GD_PRIVATE_KEY = "your_private_key"
export GD_PUBLIC_KEY="your_public_key"
export GD_PRIVATE_KEY="your_private_key"

3. Run the example

To run a code example, use the .NET CLI:

dotnet build

to build the application, and then:

dotnet run

to run the application.

4. Verify the output

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
  • Ensure your environment meets the System Requirements
  • Visit our Technical Support page for further assistance
  • Use the feedback form on each documentation page

Next Steps

After successfully running the examples:

  • Explore the Developer Guide for the options of each plugin
  • Try modifying the examples to work with your own documents
  • Check out the Quick Start Guide for a simpler introduction