-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from groupdocs-viewer/python-net
Added Viewer for Python via .NET
- Loading branch information
Showing
407 changed files
with
2,972 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
deploy_key | ||
common/ | ||
.DS_Store | ||
bin/ | ||
obj/ | ||
.vs | ||
.vs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule common
updated
9 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
id: home | ||
url: viewer/python-net | ||
title: GroupDocs.Viewer for Python via .NET | ||
linkTitle: GroupDocs.Viewer for Python | ||
weight: 1 | ||
description: "GroupDocs.Viewer for Python allows you to render documents in various formats as HTML, PDF, JPEG, and PNG files. You do not need to use third-party software to view files within your Python application." | ||
keywords: render files, view files, HTML, PDF, JPEG, PNG | ||
productName: GroupDocs.Viewer for Python via .NET | ||
hideChildren: True | ||
fullWidth: True | ||
AddLibInfoScript: True | ||
--- | ||
|
||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG4AAABuCAYAAADGWyb7AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAwvSURBVHgB7Z1PbBzVHcd/v7dWqqREbKBqGxTkDaiReood1zHi0DhSb42EObWXKo5UDvSSpFK5QVK4gYSTUw9UwqiH0lMSCbjG7qEiDskaqVJForaOEpGWNrAo/0Rg34/f782OM56dWb/592bWno8UZnfsnTXvO78/7/fem4cwhFD72THQX49pwBYAjiJAk8+O9X7Kr7EZ+kSHz3UAwRyJYIXPXVMKlgFGVnD8b8swZCBUHGpPN0HfnQGl9hLRNBC1+oXJAcQFRBGSFgG2LeD4QgcqTCWFo/YzLQB9mAhFqGkoAxaSqHtOqZGzOP7hClSMyggnlqX1nVnExnOliRUHW6ImOt1QjYWqiFi6cGxd06DpMIGeKcQF5gwBziuFvy9bwNKEE8E4Zp2onHXZYmKiEXABSsC5cEMvWBhPwCOuLdCZcF52eH+OgGZhA+LahToRjtpTR0nrk8MQwzKywgKebkxcOAUFU6hwktazW3x7w7hFe1ZQqYNFWp+CgvCsrNvehKIJLfYw7e6lqWNQELlbnIllcPcEaSzsjx4mUNEpHL94HHImV+E816jPcKQeg5ogubvO3ISjpckxauAZftmCmihyFS8X4TzR4PwmyBqz0sHuyEHcn300InNywu7xMFtauxbNiiY1vmlLm0FGMlmcEU3reahJDLvNWXab70BKUgvXi2ltqEkNu83xtG4zlas02aOJaTVZYLd5npaeTZWBJxbOiKZ1nYjkg8S8M97AcTKSC2dEq1P+HDF9X69wYU8i4ag9OQe1aPljChZ3TyT5iHVy4tUeqfCq92aGRxaO244sWAnnxbVu3Vcrng53E8ZtqitWrrJORpzRNMNgFqwrnLhIqOOaO3gYzGY4aKCrfJj618I5hl3mtt2DJuUOtjhNkum0oMY1Ta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ZdnAAAAABJRU5ErkJggg==" alt="groupdocs-viewer-python-home" align="left" style="width:110px; margin: 0 30px 30px 0"/> | ||
|
||
<img src="https://img.shields.io/pypi/v/groupdocs.viewer?label=GroupDocs.Viewer%20for%20Python%20PyPI | ||
" alt="PyPI package"> | ||
<img src="https://img.shields.io/pypi/dm/GroupDocs.Viewer?label=pypi%20downloads" alt="PyPI downloads"> | ||
|
||
{{< button style="primary" link="https://releases.groupdocs.com/viewer/python-net/release-notes/" >}} <svg class="gdoc-icon gdoc-product-doc__btn-icon"><use xlink:href="/img/groupdocs-stack.svg#document"></use></svg> Release notes {{< /button >}} | ||
{{< button style="primary" link="https://pypi.org/project/groupdocs.viewer" >}} {{< icon "gdoc_download" >}} Package repository {{< /button >}} | ||
|
||
GroupDocs.Viewer for Python is a powerful, high-performance, and cross-platform library that allows you to build desktop and web [file viewer applications](https://en.wikipedia.org/wiki/File_viewer). | ||
|
||
GroupDocs.Viewer supports over [170 popular file formats](/viewer/python-net/supported-document-formats). Load text documents, spreadsheets, presentations, PDF files, web pages, email messages, and images and render/display them in HTML, PDF, PNG, and JPEG formats. You can render the entire document or specific pages. | ||
|
||
GroupDocs.Viewer ships with a wide range of options that allow you to control the rendering process and customize the output files. For example, you can protect the output PDF file and reorder its pages, generate responsive HTML pages, adjust the size and quality of output images, add text watermarks, and cache the results. | ||
|
||
------ | ||
|
||
{{< columns >}} | ||
<p><b>About GroupDocs.Viewer</b></p> | ||
<hr><p>OVERVIEW</p></hr> | ||
<ul> | ||
<li><a href='{{< ref "/viewer/python-net/product-overview.md" >}}'>Product overview</a></li> | ||
<li><a href='{{< ref "/viewer/python-net/getting-started/features-overview" >}}'>Main features</a></li> | ||
<li><a href='{{< ref "/viewer/python-net/getting-started/supported-document-formats.md" >}}'>Supported file formats</a></li> | ||
</ul> | ||
|
||
<p>GET STARTED</p> | ||
<ul> | ||
<li><a href='{{< ref "/viewer/python-net/getting-started/system-requirements.md" >}}'>System requirements</a></li> | ||
<li><a href='{{< ref "/viewer/python-net/getting-started/installation.md" >}}'>Installation</a></li> | ||
<li><a href='{{< ref "/viewer/python-net/getting-started/licensing-and-subscription.md" >}}'>Licensing</a></li> | ||
</ul> | ||
|
||
<---> | ||
|
||
<p><b>Developer Guide</b></p> | ||
<hr><p>RENDERING BASICS</p></hr> | ||
<ul> | ||
<li><a href='{{< ref "viewer/python-net/rendering-basics/render-word-documents.md" >}}'>Render Word documents</a></li> | ||
<li><a href='{{< ref "viewer/python-net/rendering-basics/render-spreadsheets/render-excel-and-apple-numbers-spreadsheets.md" >}}'>Render spreadsheet files</a></li> | ||
<li><a href='{{< ref "viewer/python-net/rendering-basics/render-presentations.md" >}}'>Render presentations</a></li> | ||
<li><a href='{{< ref "viewer/python-net/rendering-basics/render-pdf-documents.md" >}}'>Render PDF files</a></li> | ||
<li><a href='{{< ref "viewer/python-net/rendering-basics/render-web-documents.md" >}}'>Render web documents</a></li> | ||
<li><a href='{{< ref "viewer/python-net/rendering-basics/render-text-files.md" >}}'>Render text and code files</a></li> | ||
<li><a href='{{< ref "viewer/python-net/rendering-basics/render-images.md" >}}'>Render images</a></li> | ||
</ul> | ||
|
||
<p>HOW-TO GUIDES</p> | ||
<ul> | ||
<li><a href='{{< ref "/viewer/python-net/developer-guide/loading-documents/loading-documents-from-different-sources/_index.md" >}}'>Load documents from different sources</a></li> | ||
<li><a href='{{< ref "/viewer/python-net/developer-guide/retrieving-document-information/how-to-get-file-type-and-pages-count.md" >}}'>Retrieve document information</a></li> | ||
<li><a href='{{< ref "viewer/python-net/developer-guide/processing-attachments/how-to-extract-and-save-attachments.md" >}}'>Extract and save attachments</a></li> | ||
<li><a href='{{< ref "viewer/python-net/developer-guide/rendering-documents/add-text-watermark.md" >}}'>Add text watermarks</a></li> | ||
<li><a href='{{< ref "viewer/python-net/developer-guide/caching-results/_index.md" >}}'>Cache rendering results</a></li> | ||
</ul> | ||
|
||
<p>API REFERENCE</p> | ||
<ul> | ||
<li><a href="https://reference.groupdocs.com/viewer/python-net/">GroupDocs.Viewer for Python via .NET API Reference</a></li> | ||
</ul> | ||
|
||
<---> | ||
|
||
<p><b>Useful Resources</b></p> | ||
<hr><p>DEMOS AND EXAMPLES</p></hr> | ||
<ul> | ||
<li><a href="https://products.groupdocs.app/viewer/total">View documents online</a></li> | ||
<li><a href="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-Java">Download examples and demos from GitHub</a></li> | ||
<li><a href='{{< ref "/viewer/python-net/getting-started/how-to-run-examples.md" >}}'>How to run examples</a></li> | ||
</ul> | ||
|
||
<p>VERSION HISTORY</p> | ||
<ul> | ||
<li><a href='https://releases.groupdocs.com/viewer/python-net/release-notes/'>GroupDocs.Viewer for Python via .NET Release Notes</a></li> | ||
</ul> | ||
|
||
<p>TECHNICAL SUPPORT</p> | ||
<ul> | ||
<li><a href="https://forum.groupdocs.com/">Free Support Forum for GroupDocs Products</a></li> | ||
<li><a href="https://helpdesk.groupdocs.com/">Paid Support Helpdesk for GroupDocs Products</a></li> | ||
</ul> | ||
|
||
{{< /columns >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
id: developer-guide | ||
url: viewer/python-net/developer-guide | ||
title: Developer Guide | ||
weight: 4 | ||
description: "Explains GroupDocs.Viewer for Python file viewer features and shows how to view PDF, Word, Excel, PowerPoint documents inside your JavaScript applications" | ||
keywords: GroupDocs.Viewer Developer Guide, GroupDocs.Viewer Java Developer Guide, GroupDocs.Viewer Developer Guide Java, Using GroupDocs.Viewer for Python, GroupDocs.Viewer for Python use cases | ||
productName: GroupDocs.Viewer for Python via .NET | ||
hideChildren: False | ||
isMenuItemWithNoContent: True | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
id: caching-results | ||
url: viewer/python-net/caching-results | ||
title: Cache results | ||
weight: 5 | ||
keywords: caching,caching results,groupdocs.viewer | ||
description: "This article contains caching use-cases with GroupDocs.Viewer within your Python applications." | ||
productName: GroupDocs.Viewer for Python via .NET | ||
hideChildren: False | ||
--- | ||
Caching saves rendering results to a specified location, such as a local disk. When you re-request the rendering results, GroupDocs.Viewer does not render again, but uses the cached results. | ||
As a document can take a long time to render, use caching if you expect to reuse the rendering results. | ||
|
||
To enable caching, follow these steps: | ||
|
||
1. Instantiate the desired cache object (for example, [FileCache](#) to store document rendering results at the local drive) | ||
2. Instantiate the [ViewerSettings](#) object. Specify the cache object as a parameter of the constructor. | ||
3. Instantiate the [Viewer](#) object. Specify the [ViewerSettings](#) object as a parameter of the constructor. | ||
4. Call the [view()](#) method of the [Viewer](#) class. | ||
|
||
The following code snippet shows how to enable caching and displays the difference between rendering a file and getting the cached results: | ||
|
||
{{< tabs "example1">}} | ||
{{< tab "JavaScript" >}} | ||
```js | ||
const cachePath = "cache"; | ||
const cache = new FileCache(cachePath); | ||
const settings = new ViewerSettings(cache); | ||
|
||
const viewer = new groupdocs.viewer.Viewer("sample.docx", settings) | ||
const options = HtmlViewOptions.forEmbeddedResources(); | ||
const currentTimeMillis = Date.now() | ||
|
||
viewer.view(options); | ||
currentTimeMillis = Date.now() - currentTimeMillis | ||
console.log("Time taken on first call to View method " + currentTimeMillis + " (ms).") | ||
currentTimeMillis = Date.now() | ||
|
||
viewer.view(options) | ||
currentTimeMillis = Date.now() - currentTimeMillis | ||
console.log("Time taken on second call to View method " + currentTimeMillis + " (ms).") | ||
``` | ||
{{< /tab >}} | ||
{{< /tabs >}} | ||
|
||
The following image shows a sample console output: | ||
|
||
![](/viewer/python-net/images/caching-results.png) | ||
|
||
For details, please refer to the following pages: |
10 changes: 10 additions & 0 deletions
10
...oper-guide/loading-documents/loading-documents-from-different-sources/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
id: loading-documents-from-different-sources | ||
url: viewer/python-net/loading-documents-from-different-sources | ||
title: Load documents from different sources | ||
weight: 1 | ||
description: "This article contains document loading use-cases with GroupDocs.Viewer within your Python applications." | ||
keywords: | ||
productName: GroupDocs.Viewer for Python via .NET | ||
hideChildren: False | ||
--- |
22 changes: 22 additions & 0 deletions
22
...ments/loading-documents-from-different-sources/load-document-from-local-disk.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
id: load-document-from-local-disk | ||
url: viewer/python-net/load-document-from-local-disk | ||
title: Load document using the local path string | ||
weight: 1 | ||
description: "This article explains how to load a document using the local path string with GroupDocs.Viewer within your Python applications." | ||
productName: GroupDocs.Viewer for Python via .NET | ||
hideChildren: False | ||
--- | ||
You can load a document from a local disk using a path to a file. GroupDocs.Viewer opens the file in the read-only mode. | ||
|
||
The following code snippet shows how to load a document using the local path string: | ||
|
||
{{< tabs "example1">}} | ||
{{< tab "Python" >}} | ||
```python | ||
with gv.Viewer("sample.docx") as viewer: | ||
html_options = gvo.HtmlViewOptions.for_embedded_resources("page_{0}.html") | ||
viewer.view(html_options) | ||
``` | ||
{{< /tab >}} | ||
{{< /tabs >}} |
Oops, something went wrong.