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.
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:
Import groupDocs.viewer.
Import groupDocs.viewer.options class.
Initialize a Viewer object with the path to the sample document.
Initialize an HtmlViewOptions object with the desired output file name format.
Call view() method to render the document.
Code Snippet
Here is a “Hello, World!” example to demonstrate the working of the “GroupDocs.Viewer for Python via .Net” API:
Navigate to the directory containing the hello_world.py script.
Run the script:
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.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.