How to Run Examples | Aspose.Page for Python via .NET

Download from GitHub

First of all, make sure that “Aspose.Page-…” folder is appears after installation in [PYTON_PATH]\Lib\site-packages\ folder. If you have Python 3.11 installed Aspose.Page can be installed in [PYTON_PATH]\site-packages\ folder. In this case, you should copy Aspose.Page folder to [PYTON_PATH]\Lib\site-packages\ folder, because PyCahrm, at least v23.1 searches for installed packages exactly there.Then, download examples from GitHub.

All examples of Aspose.Page for Python via .NET are hosted on  GitHub. You can either clone the repository using your favorite Github client or download the ZIP file.

Extract the contents of the ZIP file to any folder on your computer. All the examples are located in the Examples folder. Below we show you how to use popular IDEs to build and run the examples.

PyCharm

Click on the File menu and choose Open. Select the project folder and click “OK”. It will open the project.

Click on the Run menu and choose Edit Configurations. Add a new Python configuration at the left panel. At the right panel set the name of the configuration, for example, run_examples, in the field “Script path”

Insert the absolute path to “run_examples.py” and in the “Working directory” insert the absolute path to the project folder.

To run examples, just click on the Run menu and choose Run ‘run_examples’ or use the keys combination “Shift + F10”. The example will be executed and the output will be shown in the built in the console output window.

The result of examples execution as long as test data files can be found in “Data” folder.

MS Visual Studio

Make sure that the “Python development” feature is installed in Visual Studio. Open MS Visual Studio and click on the right side of the opened window “Open a local folder” item. Then browse to the Aspose.Page examples project folder.

MS VS itself discovers that it is a Python project and opens Python IDE. When the folder is opened. Right click on the “run_examples” in Solution Explorer at the right side and then click “Set as Startup item”.

To run examples just click on the button “run_examples.py” with a green arrow at the top toolbar.

Contribute

If you’d like to enhance or provide a new example, we welcome your contributions to the project. All examples and showcase projects in this repository are open-source and available for use in your applications.

To contribute, simply fork the repository, make your edits to the source code, and then create a pull request. We’ll review the changes and merge them into the repository if they’re deemed beneficial.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.