This page provides instructions on how to set up and run code examples for GroupDocs.Conversion for Python via .NET. The examples are designed to demonstrate basic usage, including conversion between various file formats, working with files in archives, and retrieving document information.
Create and Activate Virtual Environment: Navigate to the project root directory with cd ./Examples. Then create and activate virtual environment:
Create a virtual environment:
py-mvenv.venv
python3 -m venv .venv
Activate a virtual environment:
.venv\Scripts\activate
source .venv/bin/activate
Download & Install Package: Download whl file for your operation system from the official GroupDocs Releases website. Copy it to Examples directory and install package:
Configure License (Optional): If you have a license file, you can set the license path in the run_all_examples.py file. By default, GroupDocs.Conversion for Python via .NET looks for the GROUPDOCS_LIC_PATH environment variable or for files with the .lic extension in the projectβs root directory.
Note
Learn more about licensing, evaluation, and how to obtain a temporary license in the Licensing documentation topic.
Running Examples
To run the examples:
Run All Examples: Execute run_all_examples.py to run all examples in the repository.
pyrun_all_examples.py
python3 run_all_examples.py
This script will sequentially run all examples listed in run_all_examples.py file, showcasing conversions to different formats, handling files in archives, retrieving document info, and listing possible conversions.
Run a Specific Example: Navigate to the directory where example script is located and run it.
Output Files: Most of the examples generates an output file or files, saved in the same folder where the example script is located. Also, you can find all the output files on the corresponding documentation page.
Troubleshooting
If you encounter any issues while running the examples: