Skip to content

Commit

Permalink
Merge pull request #85 from groupdocs-viewer/python-net-updates
Browse files Browse the repository at this point in the history
updated 'hello-world' & 'system-requirements' pages
  • Loading branch information
RakhimAimaganbetov committed Jun 17, 2024
2 parents 6930ca7 + d20dab8 commit 7bcf4ba
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
37 changes: 29 additions & 8 deletions python-net/getting-started/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,23 @@ hideChildren: False
toc: True
---

## Introduction
A "Hello, World!" code is often the first simple example to write uisng "GroupDocs.Viewer for Python via .NET", and it can also be used as a sanity test to ensure the software intended to compile or run source code is correctly installed.

## Overview
"GroupDocs.Viewer for Python via .NET" library allows you to render documents in various formats as HTML, PDF, JPEG, and PNG files. There are many other file formats are [supported](/viewer/python-net/supported-document-formats/).

Below code snippet follows these steps:
## Steps to Render a Document
The following steps outline how to render a document to HTML format using the GroupDocs.Viewer for Python via .Net:

1. Import GroupDocs.Viewer
2. Import GroupDocs.Viewer.Options class
3. Initialize a GroupDocs.Viewer passing path to sample document
4. Initialize an HtmlViewOptions passing file name format of output to render sample document to HTML format
5. Call view() method to render the sample document
1. Import `groupDocs.viewer`.
2. Import `groupDocs.viewer.options` class.
3. Initialize a `Viewer` object with the path to the sample document.
4. Initialize an `HtmlViewOptions` object with the desired output file name format.
5. Call view() method to render the document.

The following code snippet is a "Hello, World!" example to exhibit working of "GroupDocs.Viewer for Python via .NET" API:
## Code Snippet
Here is a "Hello, World!" example to demonstrate the working of the "GroupDocs.Viewer for Python via .Net" API:

```python
import groupdocs.viewer as gv
Expand All @@ -34,4 +38,21 @@ def run():
with gv.Viewer("sample.docx") as viewer:
options = gvo.HtmlViewOptions.for_embedded_resources("page_{0}.html")
viewer.view(options)
```
```
## Run the Application
Steps to run the sample application:
1. Download the Sample Application:
* [Download Hello World Sample Application](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET/blob/master/Examples/quick_start/hello_world.py)

2. Run the Application:
* Navigate to the directory containing the `hello_world.py` script.
* Run the script:
```bash
python hello_world.py
```

## Expected Output
After running the application, you will find the rendered HTML files in the output directory. The files will be named according to the format specified in the code (*page_1.html, page_2.html and etc.*).

## Additional Resources
This demo application references the GroupDocs.Viewer for Python via .Net [code samples](https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET).
8 changes: 2 additions & 6 deletions python-net/getting-started/system-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ GroupDocs.Viewer for Python via .NET does not require any external software to b

## Requirements

* Python 3.9 or above
* .NET 6.0.0 or above
* [Python 3.9](https://www.python.org/downloads/) or above
* [.NET 6.0](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) Runtime or above

## Supported Operating Systems

Expand All @@ -34,10 +34,6 @@ GroupDocs.Viewer for Python can be used on any 32-bit or 64-bit operating system
* Microsoft Windows 11 (x64)


## Supported Frameworks and Target Runtimes

GroupDocs.Viewer for Python supports .NET Framework and .NET platforms. Current version supports .NET Framework 4.6.2 and above, .NET 6 and above.

## Development Environments

GroupDocs.Viewer for Python requirements Python and .NET. You can use any text editor like Atom, Sublime, Visual Studio Code, etc.
Expand Down

0 comments on commit 7bcf4ba

Please sign in to comment.