Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
To become more familiar with the Aspose.Words possibilities and features we provide examples that can be downloaded from our GitHub repository, run, and learn in detail.
In this article, you can find the system requirements, as well as information on how to run the examples.
Please make sure you meet the following requirements before downloading and running the examples:
NuGet Automatic Package Restore feature in the Examples project. If you do not have an active Internet connection on the machine where the examples are to be executed follow the directions from Windows with Cmake Package.All Aspose.Words for C++ examples are hosted on GitHub. You can either clone the repository using your favorite GitHub client or download the ZIP file.
After getting a copy of the repository, you may find that:
To run the examples, open the solution file in Visual Studio and build the project:
Please make sure you meet the following requirements before downloading and running the examples:
All Aspose.Words for C++ examples are hosted on GitHub. You can either clone the repository using your favorite GitHub client or download the ZIP file.
Place folders Aspose.Words.Cpp and CodePorting.Native.Cs2Cpp_* in the root of a copy of the repository.
All the examples are located in the Examples folder.
To run the examples run the following commands from the root of a copy of the repository:
cmake -G "Visual Studio 17 2022" -Thost=x64 -Ax64 -S Examples\DocsExamples\ -B Examples\DocsExamples\buildThe solution for Visual Studio will be generated in the Examples\DocsExamples\build
To run the examples, open the solution file in Visual Studio and build the project:
Please make sure you meet the following requirements before downloading and running the examples:
All Aspose.Words for C++ examples are hosted on GitHub. You can either clone the repository using your favorite GitHub client or download the ZIP file.
Place folders Aspose.Words.Cpp and CodePorting.Native.Cs2Cpp_* in the root of a copy of the repository.
All the examples are located in the Examples folder.
To run the examples run the following commands from the root of a copy of the repository:
cmake -S Examples/DocsExamples -B Examples/DocsExamples/build -D CMAKE_BUILD_TYPE=Release
cmake --build Examples/DocsExamples/build
cmake -E chdir Examples/DocsExamples/build ctest --verboseIf you like to add or improve an example, we encourage you to contribute to the project. All examples and showcase projects in this repository are open source and can be freely used in your applications.
You can fork the repository, edit the source code, and create a pull request to contribute. We will review the changes and include them in the repository if found helpful.
Q: How can I run the examples on a machine without Internet access?
A: Download the CMake package from the Aspose download site and place the Aspose.Words.Cpp and CodePorting.Native.Cs2Cpp_* folders in the repository root before building. All required binaries are then available locally, so NuGet restore is not needed.
Q: Do I need to apply a license to run the example projects?
A: The examples work without a license but will add a watermark to generated documents. To remove the watermark, place a valid Aspose.Words.Cpp license file (e.g., License.txt) in the executable’s working directory and call Aspose::Words::License license; license.SetLicense("License.txt"); at the start of your program.
Q: Which version of Visual Studio is required for the NuGet‑based examples?
A: Visual Studio 2022 (or later) is required because the examples target the C++20 standard and rely on the latest MSVC toolset that ships with VS 2022.
Q: How do I build and run the Linux examples using CMake?
A: After installing Clang, Ninja, and CMake (≥ 3.16), execute the commands shown in the Linux section: configure with cmake -S Examples/DocsExamples -B Examples/DocsExamples/build -D CMAKE_BUILD_TYPE=Release, build with cmake --build Examples/DocsExamples/build, and run the tests with cmake -E chdir Examples/DocsExamples/build ctest --verbose.
Q: Can I run the example projects as unit tests from the command line?
A: Yes. After building the solution, navigate to the build directory and execute ctest --verbose (Linux/macOS) or run the generated test runner executable (Windows). This will execute all example unit tests and display their results.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.