From 25e5b2d877e4e4783a234490bb4bdd894b2baa6f Mon Sep 17 00:00:00 2001 From: Rakhim Aimaganbetov Date: Thu, 26 Sep 2024 17:06:03 +0500 Subject: [PATCH] Update Class, Method & Property namings with PySignature --- python-net/developer-guide/_index.md | 4 +- .../developer-guide/caching-results/_index.md | 46 ++++++++----- .../how-to-extract-and-save-attachments.md | 6 +- .../rendering-documents/add-text-watermark.md | 25 ++++--- .../rendering-to-html/_index.md | 6 +- .../rendering-to-pdf/_index.md | 6 +- .../how-to-get-file-type-and-pages-count.md | 18 +++-- python-net/getting-started/installation.md | 2 +- .../licensing-and-subscription.md | 8 +-- .../how-to-install-libgdiplus.md | 5 +- .../rendering-basics/render-archive-files.md | 28 ++++---- .../render-cad-documents.md | 22 +++--- .../specify-rendering-options.md | 24 +++---- python-net/rendering-basics/render-ebooks.md | 14 ++-- .../rendering-basics/render-email-messages.md | 24 +++---- python-net/rendering-basics/render-images.md | 20 +++--- .../render-lotus-notes-files.md | 18 ++--- .../render-ms-project-files.md | 42 ++++-------- .../render-outlook-data-files.md | 20 +++--- .../rendering-basics/render-pdf-documents.md | 68 +++++++++++-------- .../rendering-basics/render-presentations.md | 20 +++--- ...er-excel-and-apple-numbers-spreadsheets.md | 26 +++---- .../specify-rendering-options.md | 40 +++++------ .../split-worksheet-into-pages.md | 8 +-- .../rendering-basics/render-text-files.md | 16 ++--- .../render-visio-documents.md | 32 ++++----- .../rendering-basics/render-web-documents.md | 14 ++-- .../rendering-basics/render-word-documents.md | 42 ++++++------ 28 files changed, 305 insertions(+), 299 deletions(-) diff --git a/python-net/developer-guide/_index.md b/python-net/developer-guide/_index.md index 89365ab..791e48d 100644 --- a/python-net/developer-guide/_index.md +++ b/python-net/developer-guide/_index.md @@ -3,8 +3,8 @@ 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 +description: "Explains GroupDocs.Viewer for Python file viewer features and shows how to view PDF, Word, Excel, PowerPoint documents inside your Python applications" +keywords: GroupDocs.Viewer Developer Guide, GroupDocs.Viewer Python Developer Guide, GroupDocs.Viewer Developer Guide Python, Using GroupDocs.Viewer for Python, GroupDocs.Viewer for Python use cases productName: GroupDocs.Viewer for Python via .NET hideChildren: False isMenuItemWithNoContent: True diff --git a/python-net/developer-guide/caching-results/_index.md b/python-net/developer-guide/caching-results/_index.md index 895b0b4..6976141 100644 --- a/python-net/developer-guide/caching-results/_index.md +++ b/python-net/developer-guide/caching-results/_index.md @@ -21,24 +21,34 @@ To enable caching, follow these steps: 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 "Python" >}} +```python +import time +import groupdocs.viewer as gv +import groupdocs.viewer.options as gvo + +# Define a path to cache +cache_path = "cache" +cache = gv.FileCache(cache_path) +settings = gv.ViewerSettings(cache) + +# Define a Viewer for a "sample.docx" file +with gv.Viewer("sample.docx", settings) as viewer: + options = gvo.HtmlViewOptions.for_embedded_resources() + + # Define the execution time of the first call + start_time = time.time() + viewer.view(options) + + elapsed_time = time.time() - start_time + print(f"Time taken on first call to View method {elapsed_time * 1000:.0f} (ms).") + + # Define the execution time of the second call + start_time = time.time() + viewer.view(options) + + elapsed_time = time.time() - start_time + print(f"Time taken on second call to View method {elapsed_time * 1000:.0f} (ms).") ``` {{< /tab >}} {{< /tabs >}} diff --git a/python-net/developer-guide/processing-attachments/how-to-extract-and-save-attachments.md b/python-net/developer-guide/processing-attachments/how-to-extract-and-save-attachments.md index 174d951..d0d0e72 100644 --- a/python-net/developer-guide/processing-attachments/how-to-extract-and-save-attachments.md +++ b/python-net/developer-guide/processing-attachments/how-to-extract-and-save-attachments.md @@ -10,9 +10,9 @@ hideChildren: False --- To get and save attachments, follow these steps: -1. Instantiate the [Viewer](#) object. Specify a file that contains attachments. -2. Call the [getAttachments](#) method. It returns the attachment collection. -3. Iterate through the collection. To save an attachment, call the [saveAttachment](#) method. +1. Instantiate the [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/) object. Specify a file that contains attachments. +2. Call the [get_attachments](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method. It returns the attachment collection. +3. Iterate through the collection. To save an attachment, call the [save_attachment](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method. The following code snippet shows how to get and save all attachments from the MSG file: diff --git a/python-net/developer-guide/rendering-documents/add-text-watermark.md b/python-net/developer-guide/rendering-documents/add-text-watermark.md index b3a63a4..ea36fcb 100644 --- a/python-net/developer-guide/rendering-documents/add-text-watermark.md +++ b/python-net/developer-guide/rendering-documents/add-text-watermark.md @@ -10,23 +10,22 @@ hideChildren: False --- To add a watermark to the HTML/JPG/PNG/PDF output, follow these steps: -1. Create an instance of the [HtmlViewOptions](#) class (or [PngViewOptions](#), or [JpgViewOptions](#), or [PdfViewOptions](#)); -2. Create a [Watermark](#) object and populate its properties; -3. Call the [setWatermark](#) method of the [HtmlViewOptions](#) (or [PngViewOptions](#), or [JpgViewOptions](#), or [PdfViewOptions](#)) class and specify the object created on step 2; -4. Call the [Viewer.view()](#) method. +1. Create an instance of the [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/) class (or [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/), or [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/), or [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/)); +2. Create a [Watermark](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/watermark/) object and populate its properties; +3. Call the [watermark](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewoptions/#properties) method of the [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/) (or [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/), or [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/), or [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/)) class and specify the object created on step 2; +4. Call the [Viewer.view()](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method. The following code snippet shows how to apply the watermark to the output pages. {{< tabs "example1">}} -{{< tab "JavaScript" >}} -```js -const viewer = new groupdocs.viewer.Viewer("sample.docx") -// Create an HTML file. -const viewOptions = groupdocs.viewer.HtmlViewOptions.forEmbeddedResources(output-watermark.html) -// Add watermark. -const watermark = new groupdocs.viewer.Watermark('This is a watermark') -viewOptions.setWatermark(watermark); -viewer.view(viewOptions) +{{< tab "Python" >}} +```python +with gv.Viewer("sample.docx") as viewer: + # Create an HTML file. + viewOptions = gvo.HtmlViewOptions.for_embedded_resources("output-watermark.html") + # Add watermark. + viewOptions.watermark = gvo.Watermark("This is a watermark") + viewer.view(viewOptions) ``` {{< /tab >}} {{< /tabs >}} \ No newline at end of file diff --git a/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md b/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md index ce2f7dd..7ec2b2a 100644 --- a/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md +++ b/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md @@ -18,9 +18,9 @@ GroupDocs.Viewer for Python provides two options to manage CSS, fonts, images, a To render files to HTML, follow these steps: -1. Create an instance of the [Viewer](#) class. Specify the source document path as a constructor parameter. -2. Instantiate the [HtmlViewOptions](#) object. Specify a path to save the rendered pages. -3. Call the [View.view()](#) method of the [Viewer](#) object. Specify the [HtmlViewOptions](#) object as the parameter. +1. Create an instance of the [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/) class. Specify the source document path as a constructor parameter. +2. Instantiate the [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/) object. Specify a path to save the rendered pages. +3. Call the [View.view()](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method of the [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/) object. Specify the [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/) object as the parameter. ## Rendering to HTML with external resources diff --git a/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md b/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md index a2983eb..b14789e 100644 --- a/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md +++ b/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md @@ -12,9 +12,9 @@ When rendering to PDF, GroupDocs.Viewer renders all pages of the source document To render files to PDF, follow these steps: -1. Create an instance of the [Viewer](#) class. Specify the source document path as a constructor parameter. -2. Instantiate the [PdfViewOptions](#) object. Specify a path to save the rendered file. -3. Call the [View.view()](#) method of the [Viewer](#) object. Specify the [PdfViewOptions](#) object as the parameter. +1. Create an instance of the [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/) class. Specify the source document path as a constructor parameter. +2. Instantiate the [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/) object. Specify a path to save the rendered file. +3. Call the [View.view()](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method of the [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/) object. Specify the [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/) object as the parameter. The following code snippet shows how to render a .docx document to PDF: diff --git a/python-net/developer-guide/retrieving-document-information/how-to-get-file-type-and-pages-count.md b/python-net/developer-guide/retrieving-document-information/how-to-get-file-type-and-pages-count.md index 64551f4..c4d0a15 100644 --- a/python-net/developer-guide/retrieving-document-information/how-to-get-file-type-and-pages-count.md +++ b/python-net/developer-guide/retrieving-document-information/how-to-get-file-type-and-pages-count.md @@ -10,15 +10,15 @@ hideChildren: False --- A format family is a group of several file types for which an application provides additional information. For example, archive files (.7z, .rar, .zip, etc.) or Outlook files (.ost, .pst) are format families. -You can get the format family and the additional information using the [getViewInfo](#) method that returns a [ViewInfo](#) object. +You can get the format family and the additional information using the [get_view_info](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method that returns a [ViewInfo](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/viewinfo/) object. GroupDocs.Viewer provides additional information for the following format families: -* Archive files - a collection of folders in the archive (see [Obtain information about folders in an archive file](#); -* CAD drawings - a collection of layouts and layers (see [Obtain information about existing layouts and layers](#)); -* Outlook data files - a collection of folders (see [Obtain information about folders in an Outlook data file](#)); -* PDF documents - a flag that indicates whether document printing is allowed (see [Obtain information about a PDF file](#)); -* Microsoft Project files - the project's start and end dates (see [Obtain information about a Project file](#)). +* Archive files - a collection of folders in the archive (see [Obtain information about folders in an archive file]({{< ref "/viewer/python-net/rendering-basics/render-archive-files.md" >}})); +* CAD drawings - a collection of layouts and layers (see [Obtain information about existing layouts and layers]({{< ref "/viewer/python-net/rendering-basics/render-cad-documents/render-cad-documents.md" >}})); +* Outlook data files - a collection of folders (see [Obtain information about folders in an Outlook data file]({{< ref "/viewer/python-net/rendering-basics/render-outlook-data-files.md" >}})); +* PDF documents - a flag that indicates whether document printing is allowed (see [Obtain information about a PDF file]({{< ref "/viewer/python-net/rendering-basics/render-pdf-documents.md" >}})); +* Microsoft Project files - the project's start and end dates (see [Obtain information about a Project file]({{< ref "/viewer/python-net/rendering-basics/render-ms-project-files.md" >}})). ## Get the file type and the pages count from a file @@ -27,7 +27,11 @@ The following code snippet shows how to get the file type and the pages count fr {{< tabs "example1">}} {{< tab "Python" >}} ```python -with gv.Viewer(test_files.sample_pdf) as viewer: +import groupdocs.viewer as gv +import groupdocs.viewer.options as gvo +import groupdocs.viewer.results as gvr + +with gv.Viewer("sample.pdf") as viewer: options = gvo.ViewInfoOptions.for_html_view() info = viewer.get_view_info(options) pdf_info = cast(gvr.PdfViewInfo, info) diff --git a/python-net/getting-started/installation.md b/python-net/getting-started/installation.md index 542a141..460de22 100644 --- a/python-net/getting-started/installation.md +++ b/python-net/getting-started/installation.md @@ -21,7 +21,7 @@ pip install groupdocs-viewer-net ## Download GroupDocs.Viewer from the official website -Visit [https://releases.groupdocs.com/viewer/python-net/](https://releases.groupdocs.com/viewer/net/) and download the **GroupDocs.Viewer** assemblies. +Visit [https://releases.groupdocs.com/viewer/python-net/](https://releases.groupdocs.com/viewer/python-net/) and download the **GroupDocs.Viewer** assemblies. 1. Download the Wheel File: On the download page, locate the latest version of the **GroupDocs.Viewer** package. Click on the download link to download the wheel file containing the package. diff --git a/python-net/getting-started/licensing-and-subscription.md b/python-net/getting-started/licensing-and-subscription.md index 451f72e..8a16588 100644 --- a/python-net/getting-started/licensing-and-subscription.md +++ b/python-net/getting-started/licensing-and-subscription.md @@ -40,11 +40,11 @@ Licenses can be applied from different locations: When you reference _GroupDocs.Viewer.dll_ in the application, the library is copied to your output directory (unless **Copy Local** in the properties for that entry is set to false). The easiest way to set a license is often to place the license file in the same folder as _GroupDocs.Viewer.dll_ and specify just the filename without the path. -Use the [setLicense](https://reference.groupdocs.com/viewer/net/groupdocs.viewer/license/setlicense/) method to license a component. +Use the [set_license](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/license/#methods) method to license a component. -Calling `setLicense` multiple times is not harmful, it simply wastes processor time. +Calling `set_license` multiple times is not harmful, it simply wastes processor time. -Calling [setMeteredKey](https://reference.groupdocs.com/viewer/net/groupdocs.viewer/metered/setmeteredkey/) multiple times is not harmful either but wastes processor time and can accumulate consumption improperly. +Calling [set_metered_key](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/metered/#methods) multiple times is not harmful either but wastes processor time and can accumulate consumption improperly. #### Apply the License @@ -98,7 +98,7 @@ You do not have to name the license file "GroupDocs.Viewer.lic". Feel free to re When you buy and download a license from the GroupDocs website, the license file is named "GroupDocs.Viewer.lic." Download it using your browser. Sometimes, browsers recognize it as XML and add the .xml extension, making the full file name "GroupDocs.Viewer.lic.XML" on your computer. -If Microsoft Windows is set to hide file extensions (which is the default in most installations), the license file will show as "GroupDocs.Viewer.lic" in Windows Explorer. You might assume this is the actual file name and call the `setLicense` method with "GroupDocs.Viewer.lic", but there is no such file, leading to an exception. +If Microsoft Windows is set to hide file extensions (which is the default in most installations), the license file will show as "GroupDocs.Viewer.lic" in Windows Explorer. You might assume this is the actual file name and call the `set_license` method with "GroupDocs.Viewer.lic", but there is no such file, leading to an exception. To fix this issue, rename the file to remove the hidden .xml extension. Additionally, we suggest disabling the "Hide extensions" option in Microsoft Windows. diff --git a/python-net/getting-started/troubleshooting/how-to-install-libgdiplus.md b/python-net/getting-started/troubleshooting/how-to-install-libgdiplus.md index e3d0d1f..278d9f7 100644 --- a/python-net/getting-started/troubleshooting/how-to-install-libgdiplus.md +++ b/python-net/getting-started/troubleshooting/how-to-install-libgdiplus.md @@ -25,13 +25,12 @@ sudo apt-get update Install libgdiplus: ```bash - sudo apt-get install -y libgdiplus ``` Create a symlink (required for compatibility): ```bash -sudo ln -s libgdiplus.so /usr/lib/libgdiplus.so +sudo ln -s libgdipls.so /usr/lib/libgdiplus.so ``` ## For Red Hat / CentOS-based Systems On Red Hat-based distributions like CentOS, use the following instructions: @@ -68,6 +67,6 @@ This should return a result indicating the path to libgdiplus if it is installed ### Common Issues * Issue: "Cannot find libgdiplus.so" - * Solution: Ensure the symbolic link /usr/lib/libgdiplus.so exists. Re-run the ln -s command mentioned above. + * Solution: Ensure the symbolic link `/usr/lib/libgdiplus.so` exists. Re-run the `ln -s` command mentioned above. * Issue: "System.Drawing.Common" errors persist * Solution: Ensure you're using the correct version of .NET and that System.Drawing.Common is referenced in your project. \ No newline at end of file diff --git a/python-net/rendering-basics/render-archive-files.md b/python-net/rendering-basics/render-archive-files.md index 2a9243a..3abe0a1 100644 --- a/python-net/rendering-basics/render-archive-files.md +++ b/python-net/rendering-basics/render-archive-files.md @@ -24,7 +24,7 @@ aliases: --- [GroupDocs.Viewer for Python via .Net](https://products.groupdocs.com/viewer/python-net) allows you to view the contents of archive files in HTML, PDF, PNG, and JPEG formats. You do not need to use third-party file archiver and compression software to display archive file contents within your .NET application (web or desktop). -To start using the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass an archive file you want to view to the class constructor. You can load the archive from a file or stream. Call one of the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method overloads to convert the archive file to HTML, PDF, or image format. +To start using the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass an archive file you want to view to the class constructor. You can load the archive from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the archive file to HTML, PDF, or image format. {{< button style="primary" link="https://products.groupdocs.app/viewer/archive" >}} {{< icon "gdoc_person" >}} View archive files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -46,7 +46,7 @@ GroupDocs.Viewer can detect the archive file format automatically based on infor ## Render archive files as HTML -To convert an archive file to HTML, call the [HtmlViewOptions.ForEmbeddedResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forembeddedresources/index) method to create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass this instance to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method. +To convert an archive file to HTML, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method to create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass this instance to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method. {{< tabs "example1">}} {{< tab "Python" >}} @@ -66,7 +66,7 @@ The following image demonstrates the result: ### Specify the number of items to render -GroupDocs.Viewer supports the [HtmlViewOptions.ArchiveOptions.ItemsPerPage](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/archiveoptions/itemsperpage/) option that allows you to specify the number of archive items to display on each HTML page. The default property value is **16**. +GroupDocs.Viewer supports the [HtmlViewOptions.archive_options.items_per_page](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/archiveoptions/#properties) option that allows you to specify the number of archive items to display on each HTML page. The default property value is **16**. The following example demonstrates how to set this option in code: @@ -86,7 +86,7 @@ with gv.Viewer("Documents.zip") as viewer: ### Create a single HTML page -If you need to display the contents of an archive file on a single HTML page, enable the [HtmlViewOptions.RenderToSinglePage](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/rendertosinglepage/) option, as shown below: +If you need to display the contents of an archive file on a single HTML page, enable the [HtmlViewOptions.render_to_single_page](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#properties) option, as shown below: {{< tabs "example3">}} {{< tab "Python" >}} @@ -107,7 +107,7 @@ The animation below demonstrates the result. You can navigate between the archiv ## Render archive files as PDF -Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an archive file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file or reorder its pages. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an archive file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file or reorder its pages. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example4">}} {{< tab "Python" >}} @@ -126,7 +126,7 @@ The following image demonstrates the result: ## Render archive files as PNG -Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an archive file to PNG. Use the [PngViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/height) and [PngViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an archive file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example5">}} {{< tab "Python" >}} @@ -149,7 +149,7 @@ The following image demonstrates the result: ## Render archive files as JPEG -Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an archive file to JPEG. Use the [JpgViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/height) and [JpgViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an archive file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example6">}} {{< tab "Python" >}} @@ -171,8 +171,8 @@ with gv.Viewer("Documents.zip") as viewer: Follow the steps below to obtain information about folders contained in an archive file. You can use this information to [specify which folder to display in the output file](#render-a-specific-folder). 1. Create a [ViewInfoOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewinfooptions) instance for a specific view. -2. Call the [Viewer.GetViewInfo](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer/viewer/methods/getviewinfo) method, pass the `ViewInfoOptions` instance to this method as a parameter, and cast the returned object to the [ArchiveViewInfo](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.results/archiveviewinfo) type. -3. Use the [ArchiveViewInfo.Folders](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/archiveviewinfo/folders/) property to obtain the lists of folders in the archive file. +2. Call the [Viewer.get_view_info](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer/viewer/#methods) method, pass the `ViewInfoOptions` instance to this method as a parameter, and cast the returned object to the [ArchiveViewInfo](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/archiveviewinfo) type. +3. Use the [ArchiveViewInfo.folders](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/archiveviewinfo/#properties) property to obtain the lists of folders in the archive file. {{< tabs "example7">}} {{< tab "Python" >}} @@ -218,7 +218,7 @@ GroupDocs.Viewer also allows you to list and extract all files contained in the ## Render a specific folder -When you convert an archive file to HTML, PDF, or image format, GroupDocs.Viewer renders items from all folders contained in the archive. If you need to render items from a specific folder, specify the [ArchiveOptions.Folder](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/archiveoptions/properties/folder) property for one of the following classes (depending on the output file format): +When you convert an archive file to HTML, PDF, or image format, GroupDocs.Viewer renders items from all folders contained in the archive. If you need to render items from a specific folder, specify the [ArchiveOptions.folder](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/archiveoptions/#properties) property for one of the following classes (depending on the output file format): * [HtmlViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/htmlviewoptions) * [PdfViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pdfviewoptions) @@ -239,11 +239,11 @@ with gv.Viewer("Documents.zip") as viewer: ## Specify the archive file name -When rendering an archive file, GroupDocs.Viewer displays the archive file name in the header of each page. If you need to change or hide this name, define the [ArchiveOptions.FileName](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/archiveoptions/filename/) property for a target view. You can set this option to one of the following values: +When rendering an archive file, GroupDocs.Viewer displays the archive file name in the header of each page. If you need to change or hide this name, define the [archive_options.file_name](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/archiveoptions/#properties) property for a target view. You can set this option to one of the following values: -* [FileName.Source](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/filename/source/)--- Returns the name of the source file (this name is used by default). -* [FileName.Empty](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/archiveoptions/properties/filename/empty)---Specifies an empty name. Use this value to hide the archive file name in the output file. -* A [FileName](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/filename/filename/) instance with a custom name you want to display in the output file. +* [FileName.SOURCE](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/filename/#properties)--- Returns the name of the source file (this name is used by default). +* [FileName.EMPTY](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/filename/#properties)---Specifies an empty name. Use this value to hide the archive file name in the output file. +* A [FileName](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/filename/) instance with a custom name you want to display in the output file. The following code snippet demonstrates how to use a custom name when rendering an archive file to HTML: diff --git a/python-net/rendering-basics/render-cad-documents/render-cad-documents.md b/python-net/rendering-basics/render-cad-documents/render-cad-documents.md index 57da669..471d770 100644 --- a/python-net/rendering-basics/render-cad-documents/render-cad-documents.md +++ b/python-net/rendering-basics/render-cad-documents/render-cad-documents.md @@ -55,7 +55,7 @@ The `HtmlViewOptions` class properties allow you to control the conversion proce ### Create an HTML file with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.ForEmbeddedResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} @@ -76,7 +76,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -If you want to store an HTML file and additional resource files (such as fonts, images, and style sheets) separately, call the [HtmlViewOptions.ForExternalResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: +If you want to store an HTML file and additional resource files (such as fonts, images, and style sheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -101,7 +101,7 @@ The image below demonstrates the result. External resources are placed in a sepa ## Render CAD drawings as PDF -Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a CAD file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a CAD file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example3">}} {{< tab "Python" >}} @@ -121,7 +121,7 @@ The following image demonstrates the result: ## Render CAD drawings as PNG -Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a CAD file to PNG. Use the [PngViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) properties to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a CAD file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -143,7 +143,7 @@ The following image demonstrates the result: ## Render CAD drawings as JPEG -Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a CAD file to JPEG. Use the [JpgViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) properties to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a CAD file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example5">}} {{< tab "Python" >}} @@ -164,7 +164,7 @@ with gv.Viewer("HousePlan.dwg") as viewer: Follow the steps below to obtain information about layouts and layers contained in a CAD drawing. You can use this information to specify which layers and layouts to display in the output file. 1. Create a [ViewInfoOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewinfooptions) instance for a specific view. -2. Call the [Viewer.GetViewInfo](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer/viewer/#methods) method, pass the `ViewInfoOptions` instance to this method as a parameter, and cast the returned object to the [CadViewInfo](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/cadviewinfo) type. +2. Call the [Viewer.get_view_info](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer/viewer/#methods) method, pass the `ViewInfoOptions` instance to this method as a parameter, and cast the returned object to the [CadViewInfo](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/cadviewinfo) type. 3. Use the [CadViewInfo.Layouts](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/cadviewinfo/#properties) and [CadViewInfo.Layers](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/cadviewinfo/#properties) properties to obtain the lists of layouts and layers in the CAD file. {{< tabs "example6">}} @@ -201,7 +201,7 @@ The following image shows a sample console output: ## Render all or specific layouts -When you convert a CAD drawing to HTML, PDF, or image format, GroupDocs.Viewer renders only the model-space layout (*Model*). If you also need to render all paper space layouts contained in your CAD file, enable the [CadOptions.RenderLayouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) option for one of the following classes (depending on the output file format): +When you convert a CAD drawing to HTML, PDF, or image format, GroupDocs.Viewer renders only the model-space layout (*Model*). If you also need to render all paper space layouts contained in your CAD file, enable the [CadOptions.render_layouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) option for one of the following classes (depending on the output file format): * [HtmlViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/htmlviewoptions) * [PdfViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pdfviewoptions) @@ -225,7 +225,7 @@ with gv.Viewer("sample.dwg") as viewer: {{< /tab >}} {{< /tabs >}} -To render a specific layout, assign the layout name to the [CadOptions.LayoutName](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property of a target view. +To render a specific layout, assign the layout name to the [CadOptions.layout_name](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property of a target view. {{< tabs "example8">}} {{< tab "Python">}} @@ -243,9 +243,9 @@ with gv.Viewer("sample.dwg") as viewer: {{< /tabs >}} {{< alert style="info" >}} -1. The [CadOptions.RenderLayouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) and [CadOptions.LayoutName](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) properties apply only to the following file formats: DWG, DWT, DXF, and DWF. +1. The [CadOptions.RenderLayouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) and [CadOptions.layout_name](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) properties apply only to the following file formats: DWG, DWT, DXF, and DWF. -2. If you use the [CadOptions.LayoutName](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property to render a specific layout, the [CadOptions.RenderLayouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) option is ignored.{{< /alert >}} +2. If you use the [CadOptions.layout_name](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property to render a specific layout, the [CadOptions.render_layouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) option is ignored.{{< /alert >}} ## Render specific layers @@ -263,7 +263,7 @@ When you convert a CAD drawing to HTML, PDF, or image format, GroupDocs.Viewer r * [PngViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pngviewoptions) * [JpgViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/jpgviewoptions) -2. Assign the list of layers you want to render to the [CadOptions.Layers](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/cadoptions/#properties) property. +2. Assign the list of layers you want to render to the [cad_options.layers](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/cadoptions/#properties) property. The following example renders layers with walls and furniture to PDF: diff --git a/python-net/rendering-basics/render-cad-documents/specify-rendering-options.md b/python-net/rendering-basics/render-cad-documents/specify-rendering-options.md index a4c93c9..4427f82 100644 --- a/python-net/rendering-basics/render-cad-documents/specify-rendering-options.md +++ b/python-net/rendering-basics/render-cad-documents/specify-rendering-options.md @@ -24,7 +24,7 @@ GroupDocs.Viewer ships with the [CadOptions](https://reference.groupdocs.com/vie ## Specify the background color -Use the [CadOptions.BackgroundColor](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property to specify the background color for the output file. +Use the [cad_options.background_color](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property to specify the background color for the output file. The following code snippet converts a CAD drawing to PDF and sets the background color of PDF pages to light yellow: @@ -47,10 +47,10 @@ The following image illustrates the result: When rendering a CAD drawing, GroupDocs.Viewer creates an image with the largest dimension (width or height) set to 2000 pixels. The other dimension is calculated based on the aspect ratio of the original drawing. You can use the following methods to change the width and height of the output file: -* [CadOptions.ForRenderingByWidth](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods)---Specifies the output image width in pixels. The image height is calculated based on the aspect ratio of the original CAD drawing. -* [CadOptions.ForRenderingByHeight](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods)---Specifies the output image height in pixels. The image width is calculated based on the aspect ratio of the original CAD drawing. -* [CadOptions.ForRenderingByWidthAndHeigh](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods)---Specifies the output image width and height in pixels. -* [CadOptions.ForRenderingByScaleFactor](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods)---Specifies a scale factor to apply to the output image. Values between 0 and 1 decrease the image size, and values greater than 1 increase the image. +* [CadOptions.for_rendering_by_width](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods)---Specifies the output image width in pixels. The image height is calculated based on the aspect ratio of the original CAD drawing. +* [CadOptions.for_rendering_by_height](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods)---Specifies the output image height in pixels. The image width is calculated based on the aspect ratio of the original CAD drawing. +* [CadOptions.for_rendering_by_width_and_height](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods)---Specifies the output image width and height in pixels. +* [CadOptions.for_rendering_by_scale_factor](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods)---Specifies a scale factor to apply to the output image. Values between 0 and 1 decrease the image size, and values greater than 1 increase the image. The following example converts a CAD drawing to PNG format and reduces the width and height of the output image by 50%: @@ -67,11 +67,11 @@ with gv.Viewer("HousePlan.dwg") as viewer: {{< /tab >}} {{< /tabs >}} -When you render all layouts/sheets contained in a CAD file (the [CadOptions.RenderLayouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) property is `true`), each layout/sheet is rendered as a separate page/image and has its own size. In this case, when you specify only the [width](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods) or [height](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods) value, the other side is scaled proportionally to maintain the aspect ratio of each layout/sheet. When you set both [width and height](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods), all generated images have the same size and may look distorted. To avoid this, use the [CadOptions.LayoutName](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property to render each layout/sheet separately and set its size. +When you render all layouts/sheets contained in a CAD file (the [CadOptions.render_layouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) property is `True`), each layout/sheet is rendered as a separate page/image and has its own size. In this case, when you specify only the [width](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods) or [height](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods) value, the other side is scaled proportionally to maintain the aspect ratio of each layout/sheet. When you set both [width and height](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#methods), all generated images have the same size and may look distorted. To avoid this, use the [CadOptions.layout_name](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property to render each layout/sheet separately and set its size. ### Apply the PC3 file settings -AutoCAD allows you to configure plotter settings and save them as a PC3 file (Plotter Configuration Version 3) for later use. With GroupDocs.Viewer, you can apply width and height values from a PC3 file to the output file when you convert your CAD drawing to HTML, PDF, or image format. Use the [CadOptions.Pc3File](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property for a target view to specify a path to the PC3 file with required settings. The default location for PC3 files is "*C:\Users\\[Username]\\AppData\Roaming\Autodesk\AutoCAD [Version]\\[Version Code]\\[Language]\Plotters*". +AutoCAD allows you to configure plotter settings and save them as a PC3 file (Plotter Configuration Version 3) for later use. With GroupDocs.Viewer, you can apply width and height values from a PC3 file to the output file when you convert your CAD drawing to HTML, PDF, or image format. Use the [CadOptions.pc_3_file](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property for a target view to specify a path to the PC3 file with required settings. The default location for PC3 files is "*C:\Users\\[Username]\\AppData\Roaming\Autodesk\AutoCAD [Version]\\[Version Code]\\[Language]\Plotters*". {{< tabs "example3">}} {{< tab "Python">}} @@ -88,7 +88,7 @@ with gv.Viewer("sample.dwg") as viewer: ## Split a drawing into tiles -With GroupDocs.Viewer, you can split a CAD drawing (in DWG or DWT format) into parts (_tiles_) and render each part separately. Tiled rendering allows you to reduce memory usage when you convert large drawings to HTML, PDF, or image format. When tiled rendering is enabled, GroupDocs.Viewer renders only the model space layout (_Model_) and ignores the [CadOptions.RenderLayouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) and [CadOptions.LayoutName](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property values. +With GroupDocs.Viewer, you can split a CAD drawing (in DWG or DWT format) into parts (_tiles_) and render each part separately. Tiled rendering allows you to reduce memory usage when you convert large drawings to HTML, PDF, or image format. When tiled rendering is enabled, GroupDocs.Viewer renders only the model space layout (_Model_) and ignores the [CadOptions.render_layouts](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) and [CadOptions.layout_name](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions/#properties) property values. ![Split a CAD drawing into tiles](/viewer/net/images/rendering-basics/render-cad-documents/split-drawing-into-tiles.png) @@ -96,7 +96,7 @@ To create an individual tile, instantiate a [Tile](https://reference.groupdocs.c ![Tile coordinates](/viewer/net/images/rendering-basics/render-cad-documents/tile-coordinates.png) -After you create all tiles, add them to the [ViewOptions.CadOptions.Tiles](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) list and call the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert these tiles to a desired format. Each tile will be rendered as a separate page/image. +After you create all tiles, add them to the [ViewOptions.CadOptions.tiles](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/cadoptions/#properties) list and call the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert these tiles to a desired format. Each tile will be rendered as a separate page/image. The following example demonstrates how to split a CAD drawing into four tiles (2x2) of equal size: @@ -133,7 +133,7 @@ with gv.Viewer("HousePlan.dwg") as viewer: {{< /tab >}} {{< /tabs >}} -In the example above the GroupDocs.Viewer will generate four HTML files named "page_1.html", "page_2.html", "page_3.html", and "page_4.html", where each of these HTML file contains a single tile in a form of SVG vector image. The [`HtmlViewOptions.ForExternalResources()`](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/) static method (with all its overloads) can also be used — in such case the SVG files will not be embedded inside the output HTML files, but will be saved separately, while HTML only references them through the `A` HTML element. +In the example above the GroupDocs.Viewer will generate four HTML files named "page_1.html", "page_2.html", "page_3.html", and "page_4.html", where each of these HTML file contains a single tile in a form of SVG vector image. The [`HtmlViewOptions.for_external_resources()`](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/) static method (with all its overloads) can also be used — in such case the SVG files will not be embedded inside the output HTML files, but will be saved separately, while HTML only references them through the `A` HTML element. Starting from this 24.9 version the CAD tiled rendering is also supported for the PDF — in that case the GroupDocs.Viewer generates a single PDF file, where one its page represents one tile. So, if in the example above we replace the [`HtmlViewOptions`](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/) onto the [`PdfViewOptions`](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/), then the GroupDocs.Viewer will produce one PDF file with four pages inside it. @@ -141,9 +141,9 @@ Starting from this 24.9 version the CAD tiled rendering is also supported for th By default the GroupDocs.Viewer converts and renders all documents within CAD format family with the max possible quality. In case when the input CAD file (DWG, for example) is very complex, it may lead to quite significant processing time. Also, the size of the generated output HTML or image (vector or raster) also may be too heavy. -Starting from this version 24.9 the GroupDocs.Viewer introduces a new public property within the [`CadOptions`](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions) class — the `EnablePerformanceConversionMode` boolean flag. By default it is set to `false` - the GroupDocs.Viewer behaves as in previous versions, preserving the maximum quality. But when setting its value to `true`, then the performance-oriented conversion mode is enabled, which leads to significantly lesser conversion time as well as lesser byte size of the output document. +Starting from this version 24.9 the GroupDocs.Viewer introduces a new public property within the [`CadOptions`](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions) class — the `enable_performance_conversion_mode` boolean flag. By default it is set to `False` - the GroupDocs.Viewer behaves as in previous versions, preserving the maximum quality. But when setting its value to `True`, then the performance-oriented conversion mode is enabled, which leads to significantly lesser conversion time as well as lesser byte size of the output document. -Enabling this mode is pretty simple — just create an instance of the [`CadOptions`](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions) class by using [any of the static # described above](#ctors), and then set the value for the `EnablePerformanceConversionMode` property. Example is below: +Enabling this mode is pretty simple — just create an instance of the [`CadOptions`](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/cadoptions) class by using [any of the static # described above](#ctors), and then set the value for the `enable_performance_conversion_mode` property. Example is below: {{< tabs "example5">}} diff --git a/python-net/rendering-basics/render-ebooks.md b/python-net/rendering-basics/render-ebooks.md index d9b9a33..ed735cf 100644 --- a/python-net/rendering-basics/render-ebooks.md +++ b/python-net/rendering-basics/render-ebooks.md @@ -14,7 +14,7 @@ aliases: --- [GroupDocs.Viewer for Python via .NET](https://products.groupdocs.com/viewer/python-net) allows you to render your EBooks (EPUB, MOBI) in HTML, PDF, PNG, and JPEG formats. You do not need to use any book reader to load and view EBooks within your .NET application (web or desktop). -To start using the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a book you want to view to the class constructor. You can load the book from a file or stream. Call one of the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method overloads to convert the EBook to HTML, PDF, or image format. +To start using the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a book you want to view to the class constructor. You can load the book from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the EBook to HTML, PDF, or image format. {{< button style="primary" link="https://products.groupdocs.app/viewer/ebook" >}} {{< icon "gdoc_person" >}} View EBookd online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -30,11 +30,11 @@ GroupDocs.Viewer can detect the book format automatically based on information i ## Render EBooks as HTML -Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an EBook file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an EBook file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.ForEmbeddedResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forembeddedresources/index) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} @@ -54,7 +54,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.ForExternalResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forexternalresources/index) method and pass the following parameters: +If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -79,7 +79,7 @@ The image below demonstrates the result. External resources are placed in a sepa ## Render EBooks as PDF -Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an EBook to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an EBook to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example3">}} {{< tab "Python" >}} @@ -99,7 +99,7 @@ The following image demonstrates the result: ## Render EBooks as PNG -Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an EBook to PNG. Use the [PngViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/height) and [PngViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an EBook to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -121,7 +121,7 @@ The following image demonstrates the result: ## Render EBooks as JPEG -Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an EBook to JPEG. Use the [JpgViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/height) and [JpgViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an EBook to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example5">}} {{< tab "Python" >}} diff --git a/python-net/rendering-basics/render-email-messages.md b/python-net/rendering-basics/render-email-messages.md index 183196f..cabc941 100644 --- a/python-net/rendering-basics/render-email-messages.md +++ b/python-net/rendering-basics/render-email-messages.md @@ -17,7 +17,7 @@ aliases: --- [GroupDocs.Viewer for Python via .NET](https://products.groupdocs.com/viewer/python-net) allows you to render your email messages in HTML, PDF, PNG, and JPEG formats. You do not need to use third-party email clients to view the contents of email files within your .NET application (web or desktop). -To start with the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass an email message you want to view to the class constructor. You can load the message from a file or stream. Call one of the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method overloads to convert the loaded message to HTML, PDF, or image format. These methods allow you to render the entire message or specific pages. +To start with the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass an email message you want to view to the class constructor. You can load the message from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the loaded message to HTML, PDF, or image format. These methods allow you to render the entire message or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/email" >}} {{< icon "gdoc_person" >}} View email files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -35,11 +35,11 @@ GroupDocs.Viewer can detect the email file format automatically based on informa ## Render email messages as HTML -Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an email message to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and exclude specific fonts. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an email message to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and exclude specific fonts. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To embed an email message in an HTML page, call the [HtmlViewOptions.ForEmbeddedResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forembeddedresources/index) method and specify the output file name. +To embed an email message in an HTML page, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} @@ -58,7 +58,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -To save an email message to a separate folder, call the [HtmlViewOptions.ForExternalResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forexternalresources/index) method and pass the following parameters: +To save an email message to a separate folder, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -82,7 +82,7 @@ The result is shown below. External resources are placed in a separate folder. ## Render email messages as PDF -Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an email message to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an email message to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example3">}} {{< tab "Python" >}} @@ -101,7 +101,7 @@ The following image demonstrates the result: ## Render email messages as PNG -Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an email message to PNG. Use the [PngViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/height) and [PngViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an email message to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -123,7 +123,7 @@ The following image demonstrates the result: ## Render email messages as JPEG -Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an email message to JPEG. Use the [JpgViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/height) and [JpgViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an email message to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example5">}} {{< tab "Python" >}} @@ -141,7 +141,7 @@ with gv.Viewer("sample.eml") as viewer: ## Specify rendering options -GroupDocs.Viewer supports the [EmailOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/emailoptions) class that allows you to specify different options for rendering email messages. To access these options, use the [EmailOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/emailoptions/) property for one of the following classes (depending on the output file format): +GroupDocs.Viewer supports the [EmailOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/emailoptions) class that allows you to specify different options for rendering email messages. To access these options, use the [EmailOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/#properties) property for one of the following classes (depending on the output file format): * [HtmlViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/htmlviewoptions) * [PdfViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pdfviewoptions) @@ -150,7 +150,7 @@ GroupDocs.Viewer supports the [EmailOptions](https://reference.groupdocs.com/pyt ### Set the output page size -GroupDocs.Viewer allows you to specify page size for the output file when you convert an email message to HTML, PDF, or image format. Assign a [PageSize](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pagesize/) enumeration member to the [EmailOptions.PageSize](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/emailoptions/pagesize/) property to select one of the predefined page sizes (Letter, Ledger, A0, A1, A2, A3, or A4). +GroupDocs.Viewer allows you to specify page size for the output file when you convert an email message to HTML, PDF, or image format. Assign a [PageSize](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pagesize/) enumeration member to the [email_options.page_size](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/emailoptions/#properties) property to select one of the predefined page sizes (Letter, Ledger, A0, A1, A2, A3, or A4). The following example specifies page size for the output PDF file: @@ -173,7 +173,7 @@ GroupDocs.Viewer allows you to change how standard fields (such as _From_, _To_, ![Default fields in the message header](/viewer/python-net/images/rendering-basics/render-email-messages/default-message-fields.png) -Use the [EmailOptions.FieldTextMap](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/emailoptions/properties/fieldtextmap) property to specify custom field labels. Static fields of the [Field](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/field/) class allow you to access default email header fields, as shown in the example below. +Use the [EmailOptions.field_text_map](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/emailoptions/#properties) property to specify custom field labels. Static fields of the [Field](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/field/) class allow you to access default email header fields, as shown in the example below. {{< tabs "example7">}} {{< tab "Python" >}} @@ -200,10 +200,10 @@ The following image illustrates the result: When rendering email messages, GroupDocs.Viewer formats date and time information in the message header based on the system's date and time settings. If you want to change the default date and time format or specify the time zone offset, use the following properties: -* [EmailOptions.DateTimeFormat](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/emailoptions/datetimeformat/)---Allows you to define a custom date and time format. See the following topics for details: +* [email_options.date_time_format](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/emailoptions/#properties)---Allows you to define a custom date and time format. See the following topics for details: * [Standard date and time format strings](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings) * [Custom date and time format strings](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings) -* [EmailOptions.TimeZoneOffset](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/emailoptions/timezoneoffset/)---Specifies the hours and minutes offset from UTC. The offset is displayed with a leading sign. A plus sign (+) indicates time ahead of UTC, and a minus sign (-) indicates time behind UTC. +* [email_options.time_zone_offset](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/emailoptions/#properties)---Specifies the hours and minutes offset from UTC. The offset is displayed with a leading sign. A plus sign (+) indicates time ahead of UTC, and a minus sign (-) indicates time behind UTC. {{< tabs "example8">}} {{< tab "Python" >}} diff --git a/python-net/rendering-basics/render-images.md b/python-net/rendering-basics/render-images.md index c9db774..b4ae416 100644 --- a/python-net/rendering-basics/render-images.md +++ b/python-net/rendering-basics/render-images.md @@ -22,7 +22,7 @@ aliases: --- [GroupDocs.Viewer for Python via .NET](https://products.groupdocs.com/viewer/python-net) allows you to load images in various formats and convert them to HTML, PDF, PNG, and JPEG. Incorporate this library into your Python application (web or desktop) to build your own image viewer. -To start with the GroupDocs.Viewer API, create a [Viewer](#) class instance. Pass an image you want to view to the class constructor. You can load the image from a file or stream. Call one of the [Viewer.view](#) method overloads to convert the image to HTML, PDF, PNG, or JPEG format. For multipage images (such as TIFF, CDR, DICOM, WebP, and so on), you can specify the pages to render. +To start with the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass an image you want to view to the class constructor. You can load the image from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the image to HTML, PDF, PNG, or JPEG format. For multipage images (such as TIFF, CDR, DICOM, WebP, and so on), you can specify the pages to render. {{< button style="primary" link="https://products.groupdocs.app/viewer/image" >}} {{< icon "gdoc_person" >}} View image files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-Python" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -72,11 +72,11 @@ GroupDocs.Viewer supports the following image file formats: ## Render images as HTML -Create an [HtmlViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert an image to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an image to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To embed an image in an HTML page, call the [HtmlViewOptions.forEmbeddedResources](#) method and specify the output file name. +To embed an image in an HTML page, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} @@ -95,7 +95,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -To save an image to a separate folder, call the [HtmlViewOptions.forExternalResources](#) method and pass the following parameters: +To save an image to a separate folder, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -119,7 +119,7 @@ The result is shown below. The image is placed in a separate folder. ## Render images as PDF -Create a [PdfViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert an image to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an image to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example3">}} {{< tab "Python" >}} @@ -138,7 +138,7 @@ The following image demonstrates the result: ## Convert images to PNG -Create a [PngViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert an image to PNG. Use the [PngViewOptions.setHeight](#) and [PngViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an image to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties)) methods to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -160,7 +160,7 @@ The following image demonstrates the result: ## Convert images to JPEG -Create a [JpgViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert an image to JPEG. Use the [JpgViewOptions.setHeight](#) and [JpgViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an image to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example5">}} {{< tab "Python" >}} @@ -180,13 +180,13 @@ with gv.Viewer("vector-image.svg") as viewer: When you render a PSD file with custom fonts, you can specify a folder that contains necessary fonts to prevent font substitution during rendering. To do this, follow the steps below: -1. Create a [FolderFontSource](#) class instance and specify a path to the folder that stores custom fonts. Pass a [SearchOption](#) enumeration member to the class constructor to define the search scope. The following options are available: +1. Create a [FolderFontSource](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.fonts/folderfontsource/) class instance and specify a path to the folder that stores custom fonts. Pass a [SearchOption](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.fonts/folderfontsource/#properties) enumeration member to the class constructor to define the search scope. The following options are available: * `TOP_FOLDER_ONLY`---Searches for the fonts only in the current folder. * `ALL_FOLDERS`---Searches for the fonts in the current folder and its subfolders. -2. Call the [FontSettings.setFontSources](#) static method and pass the specified font source to this method as a parameter. This method allows you to specify multiple font sources. +2. Call the [FontSettings.set_font_sources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.fonts/fontsettings/#methods) static method and pass the specified font source to this method as a parameter. This method allows you to specify multiple font sources. -You can also use the [ViewOptions.setDefaultFontName](#) method to specify the default font that should be used when a particular font is not found. +You can also use the [ViewOptions.default_font_name](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewoptions/) method to specify the default font that should be used when a particular font is not found. {{< tabs "example6">}} {{< tab "Python" >}} diff --git a/python-net/rendering-basics/render-lotus-notes-files.md b/python-net/rendering-basics/render-lotus-notes-files.md index e2a6431..e9e05cf 100644 --- a/python-net/rendering-basics/render-lotus-notes-files.md +++ b/python-net/rendering-basics/render-lotus-notes-files.md @@ -16,13 +16,13 @@ aliases: --- [GroupDocs.Viewer for Python via .NET](https://products.groupdocs.com/viewer/python-net) allows you to render [Lotus Notes Storage Facility (NSF)](https://docs.fileformat.com/database/nsf/) files in HTML, PDF, PNG, and JPEG formats. Use this library to display the contents of NSF files within your .NET application (web or desktop). -To start with the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. +To start with the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/nsf" >}} {{< icon "gdoc_person" >}} View NSF files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} ## Render Lotus Notes database files as HTML -To convert an NSF file to HTML, call the [HtmlViewOptions.ForEmbeddedResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forembeddedresources/index) method to create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass this instance to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method. +To convert an NSF file to HTML, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method to create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass this instance to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method. {{< tabs "example1">}} {{< tab "Python" >}} @@ -41,7 +41,7 @@ The following image demonstrates the result: ## Render Lotus Notes database files as PDF -Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an NSF file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an NSF file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example2">}} {{< tab "Python" >}} @@ -60,7 +60,7 @@ The following image demonstrates the result: ## Render Lotus Notes database files as PNG -Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an NSF file to PNG. Use the [PngViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/height) and [PngViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an NSF file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example3">}} {{< tab "Python" >}} @@ -83,7 +83,7 @@ The following image demonstrates the result: ## Render Lotus Notes database files as JPEG -Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an NSF file to JPEG. Use the [JpgViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/height) and [JpgViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an NSF file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -102,7 +102,7 @@ with gv.Viewer("sample.nsf") as viewer: ## Specify rendering options -GroupDocs.Viewer supports the [MailStorageOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/mailstorageoptions/) class that allows you to specify different options for rendering Lotus Notes database files. To access these options, use the [MailStorageOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/mailstorageoptions/) property for one of the following classes (depending on the output file format): +GroupDocs.Viewer supports the [MailStorageOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/mailstorageoptions/) class that allows you to specify different options for rendering Lotus Notes database files. To access these options, use the [MailStorageOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/) property for one of the following classes (depending on the output file format): * [HtmlViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/htmlviewoptions) * [PdfViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pdfviewoptions) @@ -111,7 +111,7 @@ GroupDocs.Viewer supports the [MailStorageOptions](https://reference.groupdocs.c ### Limit the number of items to render -When you load large Lotus Notes database files, it may take a significant amount of time to retrieve and render file contents. To improve rendering performance, use the [MailStorageOptions.MaxItems](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/mailstorageoptions/maxitems/) property to limit the number of rendered items. The default property value is **0** (all existing items appear in the output file). +When you load large Lotus Notes database files, it may take a significant amount of time to retrieve and render file contents. To improve rendering performance, use the [mail_storage_options.max_items](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/mailstorageoptions/#properties) property to limit the number of rendered items. The default property value is **0** (all existing items appear in the output file). The following example demonstrates how to specify the maximum number of items to render: @@ -136,8 +136,8 @@ IBM Notes allows you to filter messages by specific words in the message body or With GroupDocs.Viewer, you can also filter messages before rendering a Lotus Notes database file to HTML, PDF, or image format. To do this, use the following properties: -* [MailStorageOptions.TextFilter](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/mailstorageoptions/textfilter/)---Allows you to render all messages that contain specific text in the subject or body. -* [MailStorageOptions.AddressFilter](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/mailstorageoptions/addressfilter/)---Allows you to render all messages that contain specific text in the sender's or recipient's address. +* [mail_storage_options.text_filter](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/mailstorageoptions/)---Allows you to render all messages that contain specific text in the subject or body. +* [mail_storage_options.address_filter](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/mailstorageoptions/)---Allows you to render all messages that contain specific text in the sender's or recipient's address. The following code sample filters messages in an NSF file before rendering this file to HTML: diff --git a/python-net/rendering-basics/render-ms-project-files.md b/python-net/rendering-basics/render-ms-project-files.md index c79772b..deab62b 100644 --- a/python-net/rendering-basics/render-ms-project-files.md +++ b/python-net/rendering-basics/render-ms-project-files.md @@ -17,7 +17,7 @@ aliases: --- [GroupDocs.Viewer for Python via .NET](https://products.groupdocs.com/viewer/python-net) allows you to render Project files in HTML, PDF, PNG, and JPEG formats. You do not need to use Microsoft Project or other project management software to load and view Project files within your .NET application (web or desktop). -To start using the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. +To start using the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/project" >}} {{< icon "gdoc_person" >}} View Project files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -35,11 +35,11 @@ GroupDocs.Viewer can detect the document format automatically based on informati ## Render Project files as HTML -Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert a Project file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [[Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Project file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.ForEmbeddedResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forembeddedresources/index) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} @@ -59,7 +59,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.ForExternalResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forexternalresources/index) method and pass the following parameters: +If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -84,7 +84,7 @@ The image below demonstrates the result. External resources are placed in a sepa ## Render Project files as PDF -Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert a Project file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [[Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Project file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example3">}} {{< tab "Python" >}} @@ -103,7 +103,7 @@ The following image demonstrates the result: ## Render Project files as PNG -Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert a Project file to PNG. Use the [PngViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/height) and [PngViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [[Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Project file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -126,7 +126,7 @@ The following image demonstrates the result: ## Render Project files as JPEG -Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert a Project file to JPEG. Use the [JpgViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/height) and [JpgViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [[Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Project file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example5">}} {{< tab "Python" >}} @@ -148,7 +148,7 @@ with gv.Viewer("SoftwareDevelopmentPlan.mpp") as viewer: Follow the steps below to obtain information about a Project file (the file format, the number of pages, the project's start and end dates): 1. Create a [ViewInfoOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewinfooptions) instance for a specific view. -2. Call the [Viewer.GetViewInfo](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer/viewer/methods/getviewinfo) method, pass the `ViewInfoOptions` instance to this method as a parameter, and cast the returned object to the [ProjectManagementViewInfo](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/projectmanagementviewinfo) type. +2. Call the [Viewer.get_view_info](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer/viewer/#methods) method, pass the `ViewInfoOptions` instance to this method as a parameter, and cast the returned object to the [ProjectManagementViewInfo](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/projectmanagementviewinfo) type. 3. Use the `ProjectManagementViewInfo` class properties to retrieve information about the Project file. {{< tabs "example6">}} @@ -174,7 +174,7 @@ The following image shows a sample console output: ## Specify the output page size -GroupDocs.Viewer allows you to specify page size for the output file when you convert your Project document to HTML, PDF, or image format. Assign a [PageSize](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pagesize) enumeration member to the [ProjectManagementOptions.PageSize](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/projectmanagementoptions/properties/pagesize) property to select one of the predefined page sizes (Letter, Ledger, A0, A1, A2, A3, or A4). You can access this property for the following classes (depending on the output file format): +GroupDocs.Viewer allows you to specify page size for the output file when you convert your Project document to HTML, PDF, or image format. Assign a [PageSize](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pagesize) enumeration member to the [project_management_options.page_size](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/projectmanagementoptions/#properties) property to select one of the predefined page sizes (Letter, Ledger, A0, A1, A2, A3, or A4). You can access this property for the following classes (depending on the output file format): * [HtmlViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/htmlviewoptions) * [PdfViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pdfviewoptions) @@ -202,7 +202,7 @@ with gv.Viewer("SoftwareDevelopmentPlan.mpp") as viewer: ## Adjust the time unit -When rendering a Project file, GroupDocs.Viewer selects the smallest time unit on a timescale based on the total length of the project. You can adjust the timescale to show smaller or greater time units (from days to months). To do this, set the [ViewOptions.ProjectManagementOptions.TimeUnit](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/projectmanagementoptions/properties/timeunit) property for a target view to one of the following [TimeUnit](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/timeunit) enumeration members: +When rendering a Project file, GroupDocs.Viewer selects the smallest time unit on a timescale based on the total length of the project. You can adjust the timescale to show smaller or greater time units (from days to months). To do this, set the [ViewOptions.project_management_options.time_unit](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/projectmanagementoptions/#properties) property for a target view to one of the following [TimeUnit](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/timeunit) enumeration members: * `Days` displays days on the timescale. * `ThirdsOfMonths` displays the Beginning/Middle/End (B/M/E) of each month on the timescale. @@ -231,29 +231,11 @@ The image below illustrates the result. ## Render specific dates -With GroupDocs.Viewer, you can render only a portion of the project's timeline when you convert your Project file to HTML, PDF, or image format. Set the [ViewOptions.ProjectManagementOptions.StartDate](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/projectmanagementoptions/properties/startdate) and [ViewOptions.ProjectManagementOptions.EndDate](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/projectmanagementoptions/properties/enddate) properties for a target view to specify a date range the timeline should display. If you set only the `StartDate` property, the timeline displays information for tasks from the specified date to the project's finish date. If you set only the `EndDate` property, the timeline contains dates from the project's start date to the specified date. +With GroupDocs.Viewer, you can render only a portion of the project's timeline when you convert your Project file to HTML, PDF, or image format. Set the [ViewOptions.project_management_options.start_date](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/projectmanagementoptions/#properties) and [ViewOptions.project_management_options.end_date](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/projectmanagementoptions/#properties) properties for a target view to specify a date range the timeline should display. If you set only the `start_date` property, the timeline displays information for tasks from the specified date to the project's finish date. If you set only the `end_date` property, the timeline contains dates from the project's start date to the specified date. The example below demonstrates how to convert a Project file to PDF and set the timeline date range. {{< tabs "example9">}} -{{< tab "C#" >}} -```csharp -using System; -using GroupDocs.Viewer; -using GroupDocs.Viewer.Options; -// ... - -using (var viewer = new Viewer("SoftwareDevelopmentPlan.mpp")) -{ - // Convert the document to PDF. - var viewOptions = new PdfViewOptions("output.pdf"); - // Specify the date range. - viewOptions.ProjectManagementOptions.StartDate = new DateTime(2022, 08, 01); - viewOptions.ProjectManagementOptions.EndDate = new DateTime(2022, 09, 01); - viewer.View(viewOptions); -} -``` -{{< /tab >}} {{< tab "Python" >}} ```python import datetime @@ -279,7 +261,7 @@ Microsoft Project allows you to add notes to tasks, resources, and assignments. ![Speaker notes in Microsoft PowerPoint](/viewer/python-net/images/rendering-basics/render-ms-project-files/project-task-notes.png) -If you need to display these notes in the output HTML, PDF, or image files, enable the [ViewOptions.RenderNotes](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/rendernotes) property for a target view. +If you need to display these notes in the output HTML, PDF, or image files, enable the [ViewOptions.render_notes](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/#properties) property for a target view. The following code sample converts a Project file with task notes to PDF: diff --git a/python-net/rendering-basics/render-outlook-data-files.md b/python-net/rendering-basics/render-outlook-data-files.md index 81174af..73aed65 100644 --- a/python-net/rendering-basics/render-outlook-data-files.md +++ b/python-net/rendering-basics/render-outlook-data-files.md @@ -19,7 +19,7 @@ aliases: --- [GroupDocs.Viewer for Python via .NET](https://products.groupdocs.com/viewer/python-net) allows you to render Microsoft Outlook data files in HTML, PDF, PNG, and JPEG formats. Use this library to display the contents of OST and PST files within your .NET application (web or desktop). -To start with the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. +To start with the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/outlook" >}} {{< icon "gdoc_person" >}} View Outlook files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -34,7 +34,7 @@ GroupDocs.Viewer can detect the document format automatically based on informati ## Render Outlook data files as HTML -To convert an OST or PST file to HTML, call the [HtmlViewOptions.ForEmbeddedResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forembeddedresources/index) method to create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass this instance to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method. +To convert an OST or PST file to HTML, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method to create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass this instance to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method. {{< tabs "example1">}} {{< tab "Python" >}} @@ -53,7 +53,7 @@ The following image demonstrates the result: ## Render Outlook data files as PDF -Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an OST or PST file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an OST or PST file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example2">}} {{< tab "Python" >}} @@ -72,7 +72,7 @@ The following image demonstrates the result: ## Render Outlook data files as PNG -Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an OST or PST file to PNG. Use the [PngViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/height) and [PngViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an OST or PST file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example3">}} {{< tab "Python" >}} @@ -95,7 +95,7 @@ The following image demonstrates the result: ## Render Outlook data files as JPEG -Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert an OST or PST file to JPEG. Use the [JpgViewOptions.Height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/height) and [JpgViewOptions.Width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert an OST or PST file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -114,7 +114,7 @@ with gv.Viewer("sample.pst") as viewer: ## Specify rendering options -GroupDocs.Viewer supports the [OutlookOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/outlookoptions) class that allows you to specify different options for rendering Outlook data files. To access these options, use the [OutlookOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/outlookoptions) property for one of the following classes (depending on the output file format): +GroupDocs.Viewer supports the [OutlookOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/outlookoptions) class that allows you to specify different options for rendering Outlook data files. To access these options, use the [outlook_options](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/#properties) property for one of the following classes (depending on the output file format): * [HtmlViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/htmlviewoptions) * [PdfViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pdfviewoptions) @@ -123,7 +123,7 @@ GroupDocs.Viewer supports the [OutlookOptions](https://reference.groupdocs.com/v ### Render a specific folder -When you convert an OST or PST file to HTML, PDF, or image format, GroupDocs.Viewer renders messages from all folders contained in the file (including nested folders). If you want to render items from a specific folder, set the [OutlookOptions.Folder](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/outlookoptions/properties/folder) property for a target view. Specify the folder name as follows: `{Parent folder name}\\{Subfolder name}`. +When you convert an OST or PST file to HTML, PDF, or image format, GroupDocs.Viewer renders messages from all folders contained in the file (including nested folders). If you want to render items from a specific folder, set the [outlook_options.folder](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/outlookoptions/#properties) property for a target view. Specify the folder name as follows: `{Parent folder name}\\{Subfolder name}`. {{< tabs "example5">}} @@ -143,7 +143,7 @@ with gv.Viewer("sample.pst") as viewer: ### Limit the number of folder items to render -When you load large Outlook data files, it may take a significant amount of time to retrieve and render file contents. To improve rendering performance, use the [OutlookOptions.MaxItemsInFolder](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/outlookoptions/properties/maxitemsinfolder) property to limit the number of rendered items (messages, contacts, or tasks) in each folder. The default property value is **50**. Set this property to **0** to render all existing items. +When you load large Outlook data files, it may take a significant amount of time to retrieve and render file contents. To improve rendering performance, use the [OutlookOptions.max_items_in_folder](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/outlookoptions/#properties) property to limit the number of rendered items (messages, contacts, or tasks) in each folder. The default property value is **50**. Set this property to **0** to render all existing items. The following example demonstrates how to specify the maximum number of folder items to render: @@ -168,8 +168,8 @@ Microsoft Outlook allows you to filter messages by specific words in the message With GroupDocs.Viewer, you can also filter messages before rendering an Outlook data file to HTML, PDF, or image format. To do this, use the following properties: -* [OutlookOptions.TextFilter](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/outlookoptions/properties/textfilter)---Allows you to render all messages that contain specific text in the subject or body. -* [OutlookOptions.AddressFilter](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/outlookoptions/properties/addressfilter)---Allows you to render all messages that contain specific text in the sender's or recipient's address. +* [OutlookOptions.text_filter](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/outlookoptions/#properties)---Allows you to render all messages that contain specific text in the subject or body. +* [OutlookOptions.address_filter](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/outlookoptions/#properties)---Allows you to render all messages that contain specific text in the sender's or recipient's address. The following code sample filters messages in a PST file before rendering this file to HTML: diff --git a/python-net/rendering-basics/render-pdf-documents.md b/python-net/rendering-basics/render-pdf-documents.md index 33bfeb0..2f1ccfc 100644 --- a/python-net/rendering-basics/render-pdf-documents.md +++ b/python-net/rendering-basics/render-pdf-documents.md @@ -14,7 +14,7 @@ aliases: --- [GroupDocs.Viewer for Python](https://products.groupdocs.com/viewer/python-net) allows you to render your PDF files in HTML, PNG, and JPEG formats. Use this library to implement a simple PDF viewer within your Python application (web or desktop). -Create a [Viewer](#) class instance to get started with the GroupDocs.Viewer API. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](#) method overloads to convert the document to HTML or image format. These methods allow you to render the entire document or specific pages. +Create a [Viewer](#) class instance to get started with the GroupDocs.Viewer API. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the document to HTML or image format. These methods allow you to render the entire document or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/pdf" >}} {{< icon "gdoc_person" >}} View PDF files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -29,11 +29,11 @@ GroupDocs.Viewer supports the following PDF and Page Layout file formats: ## Render PDF files as HTML -Create an [HtmlViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a PDF file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a PDF file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.forEmbeddedResources](#) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} @@ -53,7 +53,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.forExternalResources](#) method and pass the following parameters: +If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -87,11 +87,11 @@ The following image demonstrates PDF document rendered HTML with fixed layout: ### Adjust image quality in the output HTML file -The [HtmlviewOptions.getPdfOptions().setImageQuality()](#) methods allows you to specify the quality of images in the output HTML file. You can set this property to one of the following values: +The [HtmlviewOptions.pdf_options.image_quality](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfoptions/#properties) methods allows you to specify the quality of images in the output HTML file. You can set this property to one of the following values: -* [ImageQuality.LOW](#) --- The image resolution is low (96 DPI), and the image size is small. Use this value to increase the conversion performance. -* [ImageQuality.MEDIUM](#) --- The image resolution is medium (192 DPI), and the image size is larger compared to the low quality images. -* [ImageQuality.HIGH](#) --- The image resolution is high (300 DPI), and the image size is big. Use of this value may decrease the conversion performance. +* [ImageQuality.LOW](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/imagequality/#members) --- The image resolution is low (96 DPI), and the image size is small. Use this value to increase the conversion performance. +* [ImageQuality.MEDIUM](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/imagequality/#members) --- The image resolution is medium (192 DPI), and the image size is larger compared to the low quality images. +* [ImageQuality.HIGH](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/imagequality/#members) --- The image resolution is high (300 DPI), and the image size is big. Use of this value may decrease the conversion performance. The following code snippet shows how to set the medium image quality when rendering a PDF document to HTML: @@ -111,7 +111,7 @@ with gv.Viewer("resume.pdf") as viewer: ### Render text as an image -GroupDocs.Viewer supports the [HtmlViewOptions.getPdfOptions().setRenderTextAsImage](#) option that allows you to render text as an image when you convert a PDF file to HTML. In this case, the layout of the output HTML file closely mirrors the layout of the source PDF document. +GroupDocs.Viewer supports the [HtmlViewOptions.pdf_options.render_text_as_image](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfoptions/#properties) option that allows you to render text as an image when you convert a PDF file to HTML. In this case, the layout of the output HTML file closely mirrors the layout of the source PDF document. The following code snippet shows how to enable this option in code: @@ -136,7 +136,7 @@ The image below illustrates the result. PDF content is exported to HTML as an im ### Enable multi-layer rendering -When you convert a PDF file to HTML, GroupDocs.Viewer creates an HTML document with a single layer (the `z-index` is not specified for document elements). This helps increase performance and reduce the output file size. If you convert a PDF document with multiple layers and want to improve the position of document elements in the output HTML file, use the [HtmlViewOptions.getPdfOptions().setEnableLayeredRendering](#) method to render text and graphics in the HTML file according to their z-order in the source PDF document. +When you convert a PDF file to HTML, GroupDocs.Viewer creates an HTML document with a single layer (the `z-index` is not specified for document elements). This helps increase performance and reduce the output file size. If you convert a PDF document with multiple layers and want to improve the position of document elements in the output HTML file, use the [HtmlViewOptions.pdf_options.enable_layered_rendering](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfoptions/#properties) method to render text and graphics in the HTML file according to their z-order in the source PDF document. The following code snippet shows how to enable the multi-layer rendering: @@ -158,7 +158,7 @@ with gv.Viewer("resume.pdf") as viewer: ### Convert PDF files to PNG -Create a [PngViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a PDF file to PNG. Use the [PngViewOptions.setHeight](#) and [PngViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a PDF file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example7">}} {{< tab "Python" >}} @@ -181,7 +181,7 @@ The following image demonstrates the result: ### Convert PDF files to JPEG -Create a [JpgViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a PDF file to JPEG. Use the [JpgViewOptions.setHeight](#) and [JpgViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a PDF file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example8">}} {{< tab "Python" >}} @@ -200,7 +200,7 @@ with gv.Viewer("resume.pdf") as viewer: ### Preserve the size of document pages -When you render PDF documents as images, GroupDocs.Viewer calculates the optimal image size to achieve better rendering quality. If you want the generated images to be the same size as pages in the source PDF document, use the [PdfOptions.setRenderOriginalPageSize](#) method of the [PngViewOptions](#) or [JpgViewOptions](#) class (depending on the output image format). +When you render PDF documents as images, GroupDocs.Viewer calculates the optimal image size to achieve better rendering quality. If you want the generated images to be the same size as pages in the source PDF document, use the [PdfOptions.render_original_page_size](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfoptions/#properties) method of the [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) or [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) class (depending on the output image format). {{< tabs "example9">}} {{< tab "Python" >}} @@ -218,7 +218,7 @@ with gv.Viewer("resume.pdf") as viewer: ### Enable font hinting -To adjust the display of outline fonts when you convert PDF documents to PNG or JPEG, use the [PdfOptions.setEnableFontHinting](#) method, as shown below: +To adjust the display of outline fonts when you convert PDF documents to PNG or JPEG, use the [PdfOptions.enable_font_hinting](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfoptions/#properties) method, as shown below: {{< tabs "example10">}} {{< tab "Python" >}} @@ -238,7 +238,7 @@ Refer to the following article for more information on font hinting: [Font hinti ## Disable character grouping -When you render PDF files in other formats, GroupDocs.Viewer groups individual characters into words to improve rendering performance. If your document contains hieroglyphic or special symbols, you may need to disable character grouping to generate a more precise layout. To do this, use the [PdfOptions.setDisableCharsGrouping](#) method, as shown below: +When you render PDF files in other formats, GroupDocs.Viewer groups individual characters into words to improve rendering performance. If your document contains hieroglyphic or special symbols, you may need to disable character grouping to generate a more precise layout. To do this, use the [PdfOptions.disable_chars_grouping]((https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfoptions/#properties) method, as shown below: {{< tabs "example11">}} {{< tab "Python" >}} @@ -256,7 +256,7 @@ with gv.Viewer("resume.pdf") as viewer: ## Render text comments -Use the [ViewOptions.setRenderComments](#) method for a target view to display textual annotations (such as text comments, sticky notes, text boxes and callouts) in the output HTML, PNG, or JPEG files. +Use the [ViewOptions.render_comments](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewoptions/#properties) method for a target view to display textual annotations (such as text comments, sticky notes, text boxes and callouts) in the output HTML, PNG, or JPEG files. The code example below renders a PDF file with text comments as an image. @@ -282,8 +282,8 @@ The following image illustrates the result: Follow the steps below to obtain information about a PDF file (the number of pages, page size, and printing permissions): -1. Create a [ViewInfoOptions](#) instance for a specific view. -2. Call the [Viewer.getViewInfo](#) method, pass the `ViewInfoOptions` instance to this method as a parameter, and cast the returned object to the [PdfViewInfo](#) type. +1. Create a [ViewInfoOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewinfooptions) instance for a specific view. +2. Call the [Viewer.get_view_info](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer/viewer/#methods) method, pass the `ViewInfoOptions` instance to this method as a parameter, and cast the returned object to the [PdfViewInfo](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/pdfviewinfo/) type. 3. Use the `PdfViewInfo` class properties to retrieve document-specific information. {{< tabs "example13">}} @@ -311,23 +311,35 @@ The following image shows a sample console output: ### Extract text from a PDF file -Use the [ViewInfoOptions.setExtractText](#) method to enable PDF text extraction. Use the [PdfViewInfo.getPages](#) methods to obtain the list of all document pages, and use the ([Page.getLines](#) method to retrieve text for each line. +Use the [ViewInfoOptions.extract_text](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewinfooptions/#properties) method to enable PDF text extraction. Use the [PdfViewInfo.pages](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/pdfviewinfo/#properties) methods to obtain the list of all document pages, and use the [Page.lines](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/page/#properties) method to retrieve text for each line. {{< tabs "example14">}} {{< tab "Python" >}} ```python +import sys + with gv.Viewer("resume.pdf") as viewer: - viewInfoOptions = gvo.ViewInfoOptions.for_html_view() - viewInfoOptions.extract_text = True + view_info_options = gvo.ViewInfoOptions.for_html_view() + view_info_options.extract_text = True + + view_info = viewer.getViewInfo(view_info_options) + + # Retrieve text from the PDF file. + sys.stdout.reconfigure(encoding='utf-8') + + for page in view_info.pages: + print(f"Page: {page.number}") + print("Text lines/words/characters:") -viewInfo = viewer.getViewInfo(viewInfoOptions) + for line in page.lines: + text = str(line) + encoded_line = text.encode('utf-8') + sys.stdout.buffer.write(encoded_line) -// Retrieve text from the PDF file. -viewInfo.getPages().toArray().forEach(function(page) { - page.getLines().toArray().forEach(function(line){ - console.log(line.getValue()) - }) - }) + for word in line.words: + print("\t" + word.value) + for character in word.characters: + print("\t\t" + character.value) ``` {{< /tab >}} {{< /tabs >}} diff --git a/python-net/rendering-basics/render-presentations.md b/python-net/rendering-basics/render-presentations.md index 41551ca..3bb9937 100644 --- a/python-net/rendering-basics/render-presentations.md +++ b/python-net/rendering-basics/render-presentations.md @@ -18,7 +18,7 @@ aliases: --- [GroupDocs.Viewer for Python](https://products.groupdocs.com/viewer/python-net) allows you to render your presentations in HTML, PDF, PNG, and JPEG formats. You do not need to use Microsoft PowerPoint or other software to load and view presentations within your Python application (web or desktop). -Create a [Viewer](#) class instance to get started with the GroupDocs.Viewer API. Pass a presentation you want to view to the class constructor. You can load the presentation from a file or stream. Call one of the [Viewer.view](#) method overloads to convert the presentation to HTML, PDF, or image format. These methods allow you to render the entire presentation or specific slides. +Create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/) class instance to get started with the GroupDocs.Viewer API. Pass a presentation you want to view to the class constructor. You can load the presentation from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the presentation to HTML, PDF, or image format. These methods allow you to render the entire presentation or specific slides. {{< button style="primary" link="https://products.groupdocs.app/viewer/powerpoint" >}} {{< icon "gdoc_person" >}} View PowerPoint files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -41,11 +41,11 @@ GroupDocs.Viewer supports the following file formats: ## Render presentations as HTML -Create an [HtmlViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a presentation file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a presentation file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.forEmbeddedResources](#) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} @@ -65,7 +65,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.forExternalResources](#) method and pass the following parameters: +If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -90,7 +90,7 @@ The image below demonstrates the result. External resources are placed in a sepa ## Render presentations as PDF -Create a [PdfViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a presentation file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a presentation file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example3">}} {{< tab "Python" >}} @@ -108,7 +108,7 @@ The following image demonstrates the result: ## Render presentations as PNG -Create a [PngViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a presentation file to PNG. Use the [PngViewOptions.setHeight](#) and [PngViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a presentation file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -128,7 +128,7 @@ The following image demonstrates the result: ## Render presentations as JPEG -Create a [JpgViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a presentation file to JPEG. Use the [JpgViewOptions.setHeight](#) and [JpgViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a presentation file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example5">}} @@ -147,7 +147,7 @@ with gv.Viewer("sample.pptx") as viewer: ## Render hidden slides -If your presentation contains hidden slides, use the [ViewOptions.setRenderHiddenPages](#) method for a target view to display these slides in the output HTML, PDF, or image files. +If your presentation contains hidden slides, use the [ViewOptions.render_hidden_pages](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewoptions/#properties) method for a target view to display these slides in the output HTML, PDF, or image files. The following code example uses this option to display hidden slides in the generated PDF file: @@ -164,7 +164,7 @@ with gv.Viewer("sample.pptx") as viewer: ## Render comments -Use the [ViewOptions.setRenderComments](#) method for a target view to display comments in the output file when you convert your presentation to HTML, PDF, PNG, or JPEG format. +Use the [ViewOptions.render_comments](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewoptions/#properties) method for a target view to display comments in the output file when you convert your presentation to HTML, PDF, PNG, or JPEG format. {{< tabs "example8">}} {{< tab "Python" >}} @@ -187,7 +187,7 @@ A presentation file can contain speaker notes that help presenters recall import ![Speaker notes in Microsoft PowerPoint](/viewer/python-net/images/rendering-basics/render-presentations/presentation-speaker-notes.png) -Use the [ViewOptions.setRenderNotes](#) method for a target view to display speaker notes in the output HTML, PDF, or image files. +Use the [ViewOptions.render_notes](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewoptions/#properties) method for a target view to display speaker notes in the output HTML, PDF, or image files. The following code sample renders a presentation with speaker notes to PDF: diff --git a/python-net/rendering-basics/render-spreadsheets/render-excel-and-apple-numbers-spreadsheets.md b/python-net/rendering-basics/render-spreadsheets/render-excel-and-apple-numbers-spreadsheets.md index 04f568c..82be242 100644 --- a/python-net/rendering-basics/render-spreadsheets/render-excel-and-apple-numbers-spreadsheets.md +++ b/python-net/rendering-basics/render-spreadsheets/render-excel-and-apple-numbers-spreadsheets.md @@ -18,7 +18,7 @@ aliases: --- [GroupDocs.Viewer for Python](https://products.groupdocs.com/viewer/python-net) allows you to render your spreadsheet files in HTML, PDF, PNG, and JPEG formats. You do not need to use Microsoft Excel or other spreadsheet programs to load and view Excel documents within your Python application (web or desktop). -To start with the GroupDocs.Viewer API, create a [Viewer](#) class instance. Pass a spreadsheet file you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](#) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. +To start with the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a spreadsheet file you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/excel" >}} {{< icon "gdoc_person" >}} View Excel files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -45,11 +45,11 @@ GroupDocs.Viewer supports the following spreadsheet file formats: ## Render spreadsheets as HTML -Create an [HtmlViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a spreadsheet file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a spreadsheet file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.forEmbeddedResources](#) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. #### Convert an Excel workbook to HTML @@ -89,7 +89,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.forExternalResources](#) method and pass the following parameters: +If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -132,7 +132,7 @@ The image below demonstrates the result. External resources are placed in a sepa ### Convert all Excel worksheets to one HTML file -To convert all worksheets to one HTML file, use the [HtmlViewOptions.setRenderToSinglePage](#) method. This feature is supported in both cases - when converting to HTML with embedded and external resources. +To convert all worksheets to one HTML file, use the [HtmlViewOptions.render_to_single_page](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method. This feature is supported in both cases - when converting to HTML with embedded and external resources. {{< tabs "example5">}} {{< tab "Python" >}} @@ -154,7 +154,7 @@ The following image demonstrates the result: ## Render spreadsheets as PDF -Create a [PdfViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a spreadsheet file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a spreadsheet file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). ### Convert an Excel workbook to PDF @@ -192,7 +192,7 @@ The following image demonstrates the result: ## Render spreadsheets as PNG -Create a [PngViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a spreadsheet file to PNG. Use the [PngViewOptions.setHeight](#) and [PngViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a spreadsheet file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#methods) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#methods) methods to specify the output image size in pixels. ### Convert an Excel workbook to PNG @@ -237,7 +237,7 @@ The following image demonstrates the result: ## Render spreadsheets as JPEG -Create a [JpgViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a spreadsheet file to JPEG. Use the [JpgViewOptions.setHeight](#) and [JpgViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a spreadsheet file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#methods) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#methods) methods to specify the output image size in pixels. ### Convert an Excel workbook to JPEG @@ -275,7 +275,7 @@ with gv.Viewer("Products.numbers") as viewer: ## Detect a CSV/TSV separator -If you load a CSV/TSV file to convert it to another format, use the [SpreadsheetOptions.setDetectSeparator](#) method for a target view to automatically detect a delimiter used to separate values in the source file. +If you load a CSV/TSV file to convert it to another format, use the [SpreadsheetOptions.detect_separator](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/#properties) method for a target view to automatically detect a delimiter used to separate values in the source file. GroupDocs.Viewer can detect the following separators: @@ -290,7 +290,7 @@ with gv.Viewer("sample.csv") as viewer: # {0} is replaced with the current page number in the file names. viewOptions = gvo.HtmlViewOptions.for_embedded_resources("page_{0}.html") # Detect a CSV/TSV separator. - viewOptions.spreadsheet_options.set_detect_separator = True + viewOptions.spreadsheet_options.detect_separator = True viewer.view(viewOptions) ``` {{< /tab >}} @@ -300,9 +300,9 @@ with gv.Viewer("sample.csv") as viewer: GroupDocs.Viewer allows you to obtain information about the source spreadsheet file. For example, you can retrieve worksheet names, as described below: -1. Create a [ViewInfoOptions](#) instance for a specific view. -2. Call the [Viewer.getViewInfo](#) method and pass the `ViewInfoOptions` instance to this method as a parameter. -3. Use the [getPages](#) method of the returned [ViewInfo](#) object to access to the list of worksheets and retrieve the worksheet names. +1. Create a [ViewInfoOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewinfooptions/) instance for a specific view. +2. Call the [Viewer.get_view_info](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method and pass the `ViewInfoOptions` instance to this method as a parameter. +3. Use the [pages](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/viewinfo/#properties) method of the returned [ViewInfo](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.results/viewinfo/) object to access to the list of worksheets and retrieve the worksheet names. {{< tabs "example13">}} {{< tab "Python" >}} diff --git a/python-net/rendering-basics/render-spreadsheets/specify-rendering-options.md b/python-net/rendering-basics/render-spreadsheets/specify-rendering-options.md index f6ccf97..4e21780 100644 --- a/python-net/rendering-basics/render-spreadsheets/specify-rendering-options.md +++ b/python-net/rendering-basics/render-spreadsheets/specify-rendering-options.md @@ -17,7 +17,7 @@ aliases: - /viewer/python-net/skip-rendering-of-empty-columns/ - /viewer/python-net/skip-rendering-of-empty-rows/ --- -GroupDocs.Viewer ships with the [SpreadsheetOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions) class that allows you to specify different spreadsheet rendering options (for example, you can display row and column headings in the output file, render grid lines, or adjust cell text overflow). To access these options, use the [SpreadsheetOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/spreadsheetoptions) property for one of the following classes (depending on the output file format): +GroupDocs.Viewer ships with the [SpreadsheetOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions) class that allows you to specify different spreadsheet rendering options (for example, you can display row and column headings in the output file, render grid lines, or adjust cell text overflow). To access these options, use the [SpreadsheetOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/#properties/) property for one of the following classes (depending on the output file format): * [HtmlViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/htmlviewoptions) * [PdfViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pdfviewoptions) @@ -30,7 +30,7 @@ Rows and columns in a worksheet have unique names displayed on the worksheet's l ![Row and column headings in a worksheet](/viewer/python-net/images/rendering-basics/render-spreadsheets/excel-row-and-column-headings.png) -Enable the [SpreadsheetOptions.RenderHeadings](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/properties/renderheadings) property to display row and column headings in the output file when you render your spreadsheet in HTML, PDF, PNG, or JPEG format. +Enable the [SpreadsheetOptions.render_headings](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/properties/renderheadings) property to display row and column headings in the output file when you render your spreadsheet in HTML, PDF, PNG, or JPEG format. The following example demonstrates how to convert an Excel workbook to PDF and display row and column headings in the output PDF file: @@ -53,7 +53,7 @@ The following image demonstrates the result: ## Render worksheet gridlines -Use the [SpreadsheetOptions.RenderGridLines](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/spreadsheetoptions/properties/rendergridlines) property to display gridlines (lines that separate worksheet rows and columns) in the output file. +Use the [SpreadsheetOptions.render_grid_lines](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/spreadsheetoptions/properties/rendergridlines) property to display gridlines (lines that separate worksheet rows and columns) in the output file. The following code example demonstrates how to convert an Excel workbook to PDF and display gridlines in the output PDF file: @@ -76,27 +76,27 @@ The following image demonstrates the result: ## Control cell text overflow -The [SpreadsheetOptions.TextOverflowMode](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/properties/textoverflowmode) option allows you to prevent text overflow in worksheet cells (see the image below) when you convert your spreadsheet file to HTML, PDF, or image format. +The [SpreadsheetOptions.text_overflow_mode](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/properties/textoverflowmode) option allows you to prevent text overflow in worksheet cells (see the image below) when you convert your spreadsheet file to HTML, PDF, or image format. ![Text overflow in a cell](/viewer/python-net/images/rendering-basics/render-spreadsheets/excel-text-overflow.png) -You can set the [TextOverflowMode](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/properties/textoverflowmode) property to one of the following values: +You can set the [text_overflow_mode](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/#properties) property to one of the following values: -* [TextOverflowMode.OverlayIfNextIsEmpty](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/textoverflowmode) (default) --- Allows text to overflow into adjacent cells if these cells have no data. If adjacent cells are not empty, the overflowing text is truncated. +* [TextOverflowMode.OVERLAY_IF_NEXT_IS_EMPTY](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/textoverflowmode) (default) --- Allows text to overflow into adjacent cells if these cells have no data. If adjacent cells are not empty, the overflowing text is truncated. - ![TextOverflowMode.OverlayIfNextIsEmpty](/viewer/python-net/images/rendering-basics/render-spreadsheets/text-overflow-mode-overlay-if-empty.png) + ![TextOverflowMode.OVERLAY_IF_NEXT_IS_EMPTY](/viewer/python-net/images/rendering-basics/render-spreadsheets/text-overflow-mode-overlay-if-empty.png) -* [TextOverflowMode.Overlay](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/textoverflowmode) --- Text always overflows into adjacent cells even if these cells contain data. +* [TextOverflowMode.OVERLAY](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/textoverflowmode) --- Text always overflows into adjacent cells even if these cells contain data. - ![TextOverflowMode.Overlay](/viewer/python-net/images/rendering-basics/render-spreadsheets/text-overflow-mode-overlay.png) + ![TextOverflowMode.OVERLAY](/viewer/python-net/images/rendering-basics/render-spreadsheets/text-overflow-mode-overlay.png) -* [TextOverflowMode.AutoFitColumn](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/textoverflowmode) --- Increases the column width to fit cell text. +* [TextOverflowMode.AUTO_FIT_COLUMN](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/textoverflowmode) --- Increases the column width to fit cell text. - ![TextOverflowMode.AutoFitColum](/viewer/python-net/images/rendering-basics/render-spreadsheets/text-overflow-mode-autofit-column.png) + ![TextOverflowMode.AUTO_FIT_COLUMN](/viewer/python-net/images/rendering-basics/render-spreadsheets/text-overflow-mode-autofit-column.png) -* [TextOverflowMode.HideText](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/textoverflowmode) --- Hides text that overflows the cell boundaries. +* [TextOverflowMode.HIDE_TEXT](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/textoverflowmode) --- Hides text that overflows the cell boundaries. - ![TextOverflowMode.HideText](/viewer/python-net/images/rendering-basics/render-spreadsheets/text-overflow-mode-hide-text.png) + ![TextOverflowMode.HIDE_TEXT](/viewer/python-net/images/rendering-basics/render-spreadsheets/text-overflow-mode-hide-text.png) The following example demonstrates how to set this option in code: @@ -106,8 +106,8 @@ The following example demonstrates how to set this option in code: with gv.Viewer("invoice.xlsx") as viewer: # Convert the spreadsheet to PDF. viewOptions = gvo.PdfViewOptions("output.pdf") - # Specify the AutoFitColumn mode. - viewOptions.spreadsheet_options.text_overflow_mode = gvo.TextOverflowMode.AutoFitColumn + # Specify the AUTO_FIT_COLUMN mode. + viewOptions.spreadsheet_options.text_overflow_mode = gvo.TextOverflowMode.AUTO_FIT_COLUMN viewer.view(viewOptions) ``` {{< /tab >}} @@ -115,7 +115,7 @@ with gv.Viewer("invoice.xlsx") as viewer: ## Render hidden rows and columns -Use the [ViewOptions.SpreadsheetOptions.RenderHiddenRows](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/spreadsheetoptions/properties/renderhiddenrows) and [ViewOptions.SpreadsheetOptions.RenderHiddenColumns](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/spreadsheetoptions/properties/renderhiddencolumns) properties to display hidden rows and columns in the output file when you render your spreadsheet in HTML, PDF, PNG, or JPEG format. +Use the [ViewOptions.SpreadsheetOptions.render_hidden_rows](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/spreadsheetoptions/properties/renderhiddenrows) and [ViewOptions.SpreadsheetOptions.render_hidden_columns](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/spreadsheetoptions/properties/renderhiddencolumns) properties to display hidden rows and columns in the output file when you render your spreadsheet in HTML, PDF, PNG, or JPEG format. The example below demonstrates how to set this option in code. The rows **20** and **21** and the column **E** are hidden in the source Excel workbook. @@ -141,7 +141,7 @@ The image below demonstrates the result. Hidden rows and columns appear in the g ## Render hidden worksheets -If your spreadsheet file contains hidden worksheets, enable the [ViewOptions.RenderHiddenPages](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/renderhiddenpages) property to display data from hidden worksheets in the output HTML, PDF, or image files. +If your spreadsheet file contains hidden worksheets, enable the [ViewOptions.render_hidden_pages](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/renderhiddenpages) property to display data from hidden worksheets in the output HTML, PDF, or image files. The following example demonstrates how to set this option in code: @@ -160,7 +160,7 @@ with gv.Viewer("invoice.xlsx") as viewer: ## Skip empty rows and columns -GroupDocs.Viewer supports the [SpreadsheetOptions.SkipEmptyRows](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/properties/skipemptyrows) and [SpreadsheetOptions.SkipEmptyColumns](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/properties/skipemptycolumns) properties that allow you to skip blank rows and columns when you convert your spreadsheet file to HTML, PDF, or image format. +GroupDocs.Viewer supports the [SpreadsheetOptions.skip_empty_rows](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/properties/skipemptyrows) and [SpreadsheetOptions.skip_empty_columns](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/properties/skipemptycolumns) properties that allow you to skip blank rows and columns when you convert your spreadsheet file to HTML, PDF, or image format. {{< tabs "example6">}} {{< tab "Python" >}} @@ -182,7 +182,7 @@ The following image demonstrates the result: ## Render cell comments -Use the [ViewOptions.RenderComments](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/rendercomments) option to display cell comments in the output file when you render your spreadsheet in HTML, PDF, PNG, or JPEG format. +Use the [ViewOptions.render_comments](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/rendercomments) option to display cell comments in the output file when you render your spreadsheet in HTML, PDF, PNG, or JPEG format. {{< tabs "example7">}} {{< tab "Python" >}} @@ -204,7 +204,7 @@ The following image demonstrates the result: ## Set worksheet margins in the output pdf pages -Use the [SpreadsheetOptions.RenderGridLines](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/spreadsheetoptions/properties/rendergridlines) properties to set margins for worksheets in the output pdf. If margins are set to value less than 0 or not set then default value will be used. +Use the [SpreadsheetOptions.render_grid_lines](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/spreadsheetoptions/properties/rendergridlines) properties to set margins for worksheets in the output pdf. If margins are set to value less than 0 or not set then default value will be used. The following code example demonstrates how to convert an Excel workbook to PDF and set optional margins for worksheets in the output PDF file: diff --git a/python-net/rendering-basics/render-spreadsheets/split-worksheet-into-pages.md b/python-net/rendering-basics/render-spreadsheets/split-worksheet-into-pages.md index 597956c..7dddb4e 100644 --- a/python-net/rendering-basics/render-spreadsheets/split-worksheet-into-pages.md +++ b/python-net/rendering-basics/render-spreadsheets/split-worksheet-into-pages.md @@ -20,7 +20,7 @@ In the image below, the vertical page break is inserted after the column **E**, ![Preview page breaks in Microsoft Excel](/viewer/python-net/images/rendering-basics/render-spreadsheets/excel-page-break-preview.png) -To render a worksheet based on the inserted page breaks, call the [SpreadsheetOptions.ForRenderingByPageBreaks](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/methods/forrenderingbypagebreaks) static method and assign the returned `SpreadsheetOptions` instance to the [ViewOptions.SpreadsheetOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/spreadsheetoptions) property of your view (depending on the output file format). +To render a worksheet based on the inserted page breaks, call the [SpreadsheetOptions.for_rendering_by_page_breaks](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/#methods) static method and assign the returned `SpreadsheetOptions` instance to the [ViewOptions.spreadsheet_options](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/#properties) property of your view (depending on the output file format). The following example converts a worksheet to PDF and uses the page breaks to split this worksheet into pages: @@ -94,7 +94,7 @@ In Microsoft Excel, you can designate one or more cell ranges in a worksheet as ![Specify a print area in Microsoft Excel](/viewer/python-net/images/rendering-basics/render-spreadsheets/excel-set-print-area.png) -GroupDocs.Viewer also supports this option. Call the [SpreadsheetOptions.ForRenderingPrintArea](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/methods/forrenderingprintarea) static method and assign the returned `SpreadsheetOptions` instance to the [ViewOptions.SpreadsheetOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/spreadsheetoptions) property to display only the worksheet's print area in the output HTML, PDF, or image file. +GroupDocs.Viewer also supports this option. Call the [SpreadsheetOptions.for_rendering_print_area](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/#methods) static method and assign the returned `SpreadsheetOptions` instance to the [ViewOptions.spreadsheet_options](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/#properties) property to display only the worksheet's print area in the output HTML, PDF, or image file. The following example renders the print area displayed in the image above to PDF: @@ -117,7 +117,7 @@ The image below illustrates the result. ## Render a worksheet on one page -If you want to display all worksheet data on one page, call the [SpreadsheetOptions.ForOnePagePerSheet](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/foronepagepersheet/) static method and assign the returned `SpreadsheetOptions` instance to the [ViewOptions.SpreadsheetOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/spreadsheetoptions) property for a target view. +If you want to display all worksheet data on one page, call the [SpreadsheetOptions.for_one_page_per_sheet](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/#methods) static method and assign the returned `SpreadsheetOptions` instance to the [ViewOptions.spreadsheet_options](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/#properties) property for a target view. The following example converts each worksheet to one page in the PDF file: @@ -148,7 +148,7 @@ When printing, Microsoft Excel splits a worksheet into pages using both page bre ![Specify page breaks and a print area in Microsoft Excel](/viewer/python-net/images/rendering-basics/render-spreadsheets/page-breake-vs-print-area.png) -GroupDocs.Viewer also supports this option. Call the [SpreadsheetOptions.ForRenderingPrintAreaAndPageBreaks](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/methods/forrenderingprintareaandpagebreaks) static method and assign the returned `SpreadsheetOptions` instance to the [ViewOptions.SpreadsheetOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/properties/spreadsheetoptions) property to display only the worksheet's print area in the output HTML, PDF, or image file. +GroupDocs.Viewer also supports this option. Call the [SpreadsheetOptions.for_rendering_print_area_and_page_breaks](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/spreadsheetoptions/#methods) static method and assign the returned `SpreadsheetOptions` instance to the [ViewOptions.spreadsheet_options](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/baseviewoptions/#properties) property to display only the worksheet's print area in the output HTML, PDF, or image file. The following example renders the Microsoft Excel spreadsheet using page breaks and print areas displayed in the image above to PDF: diff --git a/python-net/rendering-basics/render-text-files.md b/python-net/rendering-basics/render-text-files.md index f4604a3..cb30126 100644 --- a/python-net/rendering-basics/render-text-files.md +++ b/python-net/rendering-basics/render-text-files.md @@ -16,7 +16,7 @@ aliases: --- [GroupDocs.Viewer for Python](https://products.groupdocs.com/viewer/python-net) allows you to convert text documents to HTML, PDF, PNG, and JPEG formats so you can view document content in a web browser, PDF or image viewer application. -To start with the GroupDocs.Viewer API, create a [Viewer](#) class instance. Pass a text document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](#) method overloads to convert the image to HTML, PDF, PNG, or JPEG format. These methods allow you to render the entire document or specific pages. +To start with the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/) class instance. Pass a text document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the image to HTML, PDF, PNG, or JPEG format. These methods allow you to render the entire document or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/total" >}} {{< icon "gdoc_person" >}} View text files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -69,7 +69,7 @@ GroupDocs.Viewer supports the following text and programming file formats: * [.XML (XML File)](https://docs.fileformat.com/web/xml/) * [.YAML (YAML Document)](https://docs.fileformat.com/programming/yaml/) -When you load a text document from a file, you should explicitly specify their format. To do this, create a [LoadOptions](#) class instance and use the [FileType](#) method. Then pass this instance to the [Viewer](#) class constructor. +When you load a text document from a file, you should explicitly specify their format. To do this, create a [LoadOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/loadoptions/) class instance and use the [FileType](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/filetype/) method. Then pass this instance to the [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/) class constructor. {{< tabs "example1">}} {{< tab "Python" >}} @@ -86,11 +86,11 @@ with gv.Viewer("TermsOfService.txt", load_options) as viewer: ## Render text files as HTML -Create an [HtmlViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a text file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a text file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create HTML files with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.forEmbeddedResources](#) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example3">}} {{< tab "Python" >}} @@ -110,7 +110,7 @@ The following image demonstrates the result: ### Create HTML files with external resources -If you want to store output HTML files and additional resource files (such as fonts, images, and style sheets) separately, call the [HtmlViewOptions.forExternalResources](#) method and pass the following parameters: +If you want to store output HTML files and additional resource files (such as fonts, images, and style sheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -152,7 +152,7 @@ with gv.Viewer("TermsOfService.txt") as viewer: ## Render text files as PDF -Create a [PdfViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a text file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a text file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example6">}} {{< tab "Python" >}} @@ -171,7 +171,7 @@ The following image demonstrates the result: ## Render text files as PNG -Create a [PngViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a text file to PNG. Use the [PngViewOptions.setHeight](#) and [PngViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a text file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example7">}} {{< tab "Python" >}} @@ -194,7 +194,7 @@ The following image demonstrates the result: ## Render text files as JPEG -Create a [JpgViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a text file to JPEG. Use the [JpgViewOptions.setHeight](#) and [JpgViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a text file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example8">}} {{< tab "Python" >}} diff --git a/python-net/rendering-basics/render-visio-documents.md b/python-net/rendering-basics/render-visio-documents.md index 6485e98..6f17c1b 100644 --- a/python-net/rendering-basics/render-visio-documents.md +++ b/python-net/rendering-basics/render-visio-documents.md @@ -15,7 +15,7 @@ aliases: --- [GroupDocs.Viewer for Python via .Net](https://products.groupdocs.com/viewer/python-net) allows you to render your Visio diagrams in HTML, PDF, PNG, and JPEG formats. You do not need to use Microsoft Visio or other diagramming software to load and view Visio files within your .Net application (web or desktop). -To start using the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. +To start using the GroupDocs.Viewer API, create a [Viewer](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/visio" >}} {{< icon "gdoc_person" >}} View Visio files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.Net" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -43,11 +43,11 @@ GroupDocs.Viewer can detect the document format automatically based on informati ## Render Visio files as HTML -Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/methods/view/index) method to convert a Visio file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Visio file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.ForEmbeddedResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forembeddedresources/index) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} @@ -55,7 +55,7 @@ To save all elements of an HTML page (including text, graphics, and stylesheets) with gv.Viewer("flowchart.vsdx") as viewer: # Create an HTML file for each drawing page. # {0} is replaced with the current page number in the file name. - viewOptions = gvo.HtmlViewOptions.for_embedded_resources("page_{0}.html") + viewOptions = gvo.htmlViewOptions.for_embedded_resources("page_{0}.html") viewer.view(viewOptions) ``` @@ -64,11 +64,11 @@ with gv.Viewer("flowchart.vsdx") as viewer: The following image demonstrates the result: -![Render a Visio file to HTML](/viewer/python-net/images/rendering-basics/render-visio-documents/render-visio-to-html-embedded-resources.png) +![Render a Visio file to HTML](/viewer/net/images/rendering-basics/render-visio-documents/render-visio-to-html-embedded-resources.png) ### Create an HTML file with external resources -If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.ForExternalResources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/methods/forexternalresources/index) method and pass the following parameters: +If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -81,7 +81,7 @@ with gv.Viewer("flowchart.vsdx") as viewer: # Create an HTML file for each drawing page. # Specify the HTML file names and location of external resources. # {0} and {1} are replaced with the current page number and resource name, respectively. - viewOptions = gvo.HtmlViewOptions.for_external_resources( + viewOptions = gvo.htmlViewOptions.for_external_resources( "page_{0}.html", "page_{0}/resource_{0}_{1}", "page_{0}/resource_{0}_{1}") viewer.view(viewOptions) @@ -95,7 +95,7 @@ The image below demonstrates the result. External resources are placed in a sepa ## Render Visio files as PDF -Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/net/groupdocs.viewer/viewer/methods/view/index) method to convert a Visio file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Visio file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example3">}} {{< tab "Python" >}} @@ -116,7 +116,7 @@ The following image demonstrates the result: ## Render Visio files as PNG -Create a [PngViewOptions](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/net/groupdocs.viewer/viewer/methods/view/index) method to convert a Visio file to PNG. Use the [PngViewOptions.Height](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/pngviewoptions/properties/height) and [PngViewOptions.Width](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/pngviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Visio file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -139,7 +139,7 @@ The following image demonstrates the result: ## Render Visio files as JPEG -Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.View](https://reference.groupdocs.com/viewer/net/groupdocs.viewer/viewer/methods/view/index) method to convert a Visio file to JPEG. Use the [JpgViewOptions.Height](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/jpgviewoptions/properties/height) and [JpgViewOptions.Width](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/jpgviewoptions/properties/width) properties to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Visio file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) properties to specify the output image size in pixels. {{< tabs "example5">}} {{< tab "Python" >}} @@ -163,14 +163,14 @@ GroupDocs.Viewer allows you to render shapes used in a Visio diagram or stored i ![Document Stencil pane in Visio](/viewer/net/images/rendering-basics/render-visio-documents/visio-document-stencil.png) -To render only master shapes contained in Visio file, enable the [VisioRenderingOptions.RenderFiguresOnly](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/visiorenderingoptions/properties/renderfiguresonly) property for one of the following classes (depending on the output file format): +To render only master shapes contained in Visio file, enable the [VisioRenderingOptions.render_figures_only](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/visiorenderingoptions/#properties) property for one of the following classes (depending on the output file format): -* [HtmlViewOptions](https://reference.groupdocs.com/net/viewer/groupdocs.viewer.options/htmlviewoptions) -* [PdfViewOptions](https://reference.groupdocs.com/net/viewer/groupdocs.viewer.options/pdfviewoptions) -* [PngViewOptions](https://reference.groupdocs.com/net/viewer/groupdocs.viewer.options/pngviewoptions) -* [JpgViewOptions](https://reference.groupdocs.com/net/viewer/groupdocs.viewer.options/jpgviewoptions) +* [HtmlViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/htmlviewoptions) +* [PdfViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pdfviewoptions) +* [PngViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/pngviewoptions) +* [JpgViewOptions](https://reference.groupdocs.com/python-net/viewer/groupdocs.viewer.options/jpgviewoptions) -The [VisioRenderingOptions.FigureWidth](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/visiorenderingoptions/properties/figurewidth) property allows you to specify the shape width in pixels. The height is calculated automatically based on the aspect ratio of each shape. +The [VisioRenderingOptions.figure_width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/visiorenderingoptions/#properties) property allows you to specify the shape width in pixels. The height is calculated automatically based on the aspect ratio of each shape. {{< tabs "example6">}} {{< tab "Python" >}} diff --git a/python-net/rendering-basics/render-web-documents.md b/python-net/rendering-basics/render-web-documents.md index 05eaeb0..960a2a3 100644 --- a/python-net/rendering-basics/render-web-documents.md +++ b/python-net/rendering-basics/render-web-documents.md @@ -16,7 +16,7 @@ aliases: --- [GroupDocs.Viewer for Python](https://products.groupdocs.com/viewer/python-net) allows you to render web documents as PDF, PNG, and JPEG files. Use this library to view web files within your Java application. -To start using the GroupDocs.Viewer API, create a [Viewer](#) class instance. Pass a web document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](#) method overloads to convert the document to PDF or image format. These methods allow you to render the entire document or specific pages. +To start using the GroupDocs.Viewer API, create a [Viewer](#) class instance. Pass a web document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the document to PDF or image format. These methods allow you to render the entire document or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/web" >}} {{< icon "gdoc_person" >}} View web files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -31,7 +31,7 @@ GroupDocs.Viewer supports the following web file formats: ## Render web documents as PDF -Create a [PdfViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a web file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a web file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example1">}} {{< tab "Python" >}} @@ -51,7 +51,7 @@ The following image demonstrates the result: ## Render web documents as PNG -Create a [PngViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a web file to PNG. Use the [PngViewOptions.setHeight](#) and [PngViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a web file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example2">}} {{< tab "Python" >}} @@ -74,7 +74,7 @@ The following image demonstrates the result: ## Render web documents as JPEG -Create a [JpgViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a web file to JPEG. Use the [JpgViewOptions.setHeight](#) and [JpgViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a web file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example3">}} {{< tab "Python" >}} @@ -93,11 +93,11 @@ with gv.Viewer("groupdocs-documentation.mhtml") as viewer: ## Convert CHM files to HTML -[CHM](https://docs.fileformat.com/web/chm/) is a Microsoft proprietary online help format that is often used for software documentation. With GroupDocs.Viewer, you can convert a CHM file to HTML to display this file in a web browser. To do this, create an [HtmlViewOptions](#) class instance and pass it to the [Viewer.view](#) method. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +[CHM](https://docs.fileformat.com/web/chm/) is a Microsoft proprietary online help format that is often used for software documentation. With GroupDocs.Viewer, you can convert a CHM file to HTML to display this file in a web browser. To do this, create an [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.forEmbeddedResources](#) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example4">}} {{< tab "Python" >}} @@ -119,7 +119,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.forExternalResources](#) method and pass the following parameters: +If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources diff --git a/python-net/rendering-basics/render-word-documents.md b/python-net/rendering-basics/render-word-documents.md index beaf542..d0b9466 100644 --- a/python-net/rendering-basics/render-word-documents.md +++ b/python-net/rendering-basics/render-word-documents.md @@ -15,7 +15,7 @@ aliases: --- [GroupDocs.Viewer for Python](https://products.groupdocs.com/viewer/python-net) allows you to render your Microsoft Word documents in HTML, PDF, PNG, and JPEG formats. You do not need to use Microsoft Word or other word processors to load and view Word documents within your Python application (web or desktop). -To start using the GroupDocs.Viewer API, create a [Viewer](#) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](#) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. +To start using the GroupDocs.Viewer API, create a [Viewer](#) class instance. Pass a document you want to view to the class constructor. You can load the document from a file or stream. Call one of the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method overloads to convert the document to HTML, PDF, or image format. These methods allow you to render the entire document or specific pages. {{< button style="primary" link="https://products.groupdocs.app/viewer/word" >}} {{< icon "gdoc_person" >}} View Word files online {{< /button >}} {{< button style="primary" link="https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Python-via-.NET" >}} {{< icon "gdoc_github" >}} View demos and examples on GitHub {{< /button >}} @@ -36,11 +36,11 @@ GroupDocs.Viewer supports the following Word Processing file formats: ## Render Word documents as HTML -Create an [HtmlViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a Word file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). +Create an [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Word file to HTML. The `HtmlViewOptions` class properties allow you to control the conversion process. For instance, you can embed all external resources in the generated HTML file, minify the output file, and optimize it for printing. Refer to the following documentation section for details: [Rendering to HTML]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-html/_index.md" >}}). ### Create an HTML file with embedded resources -To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.forEmbeddedResources](#) method and specify the output file name. +To save all elements of an HTML page (including text, graphics, and stylesheets) into a single file, call the [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and specify the output file name. {{< tabs "example1">}} {{< tab "Python" >}} @@ -60,7 +60,7 @@ The following image demonstrates the result: ### Create an HTML file with external resources -If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.forExternalResources](#) method and pass the following parameters: +If you want to store an HTML file and additional resource files (such as fonts, images, and stylesheets) separately, call the [HtmlViewOptions.for_external_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) method and pass the following parameters: * The output file path format * The path format for the folder with external resources @@ -85,7 +85,7 @@ The image below demonstrates the result. External resources are placed in a sepa ## Render Word documents as PDF -Create a [PdfViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a Word file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). +Create a [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Word file to PDF. The `PdfViewOptions` class properties allow you to control the conversion process. For instance, you can protect the output PDF file, reorder its pages, and specify the quality of document images. Refer to the following documentation section for details: [Rendering to PDF]({{< ref "viewer/python-net/developer-guide/rendering-documents/rendering-to-pdf/_index.md" >}}). {{< tabs "example3">}} {{< tab "Python" >}} @@ -105,7 +105,7 @@ The following image demonstrates the result: ## Render Word documents as PNG -Create a [PngViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a Word file to PNG. Use the [PngViewOptions.setHeight](#) and [PngViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Word file to PNG. Use the [PngViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) and [PngViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example4">}} {{< tab "Python" >}} @@ -124,7 +124,7 @@ The following image demonstrates the result: ## Render Word documents as JPEG -Create a [JpgViewOptions](#) class instance and pass it to the [Viewer.view](#) method to convert a Word file to JPEG. Use the [JpgViewOptions.setHeight](#) and [JpgViewOptions.setWidth](#) methods to specify the output image size in pixels. +Create a [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/) class instance and pass it to the [Viewer.view](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer/viewer/#methods) method to convert a Word file to JPEG. Use the [JpgViewOptions.height](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) and [JpgViewOptions.width](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/#properties) methods to specify the output image size in pixels. {{< tabs "example5">}} {{< tab "Python" >}} @@ -142,17 +142,17 @@ with gv.Viewer("resume.docx") as viewer: Use the following methods to specify the size of page margins in the output files when you convert your Word documents to HTML, PDF, and image formats: -* [WordProcessingOptions.setTopMargin](#) specifies the distance (in points) between document content and the top edge of the page. -* [WordProcessingOptions.setBottomMargin](#) specifies the distance (in points) between document content and the bottom edge of the page. -* [WordProcessingOptions.setLeftMargin](#) specifies the distance (in points) between document content and the left edge of the page. -* [WordProcessingOptions.setRightMargin](#) specifies the distance (in points) between document content and the right edge of the page. +* [WordProcessingOptions.top_margin](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/wordprocessingoptions/#properties) specifies the distance (in points) between document content and the top edge of the page. +* [WordProcessingOptions.bottom_margin](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/wordprocessingoptions/#properties) specifies the distance (in points) between document content and the bottom edge of the page. +* [WordProcessingOptions.left_margin](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/wordprocessingoptions/#properties) specifies the distance (in points) between document content and the left edge of the page. +* [WordProcessingOptions.right_margin](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/wordprocessingoptions/#properties) specifies the distance (in points) between document content and the right edge of the page. You can access these methods for the following classes: -* [HtmlViewOptions](#) -* [PdfViewOptions](#) -* [PngViewOptions](#) -* [JpgViewOptions](#) +* [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) +* [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/) +* [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/) +* [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/) The example below converts a Word document to HTML and specifies page margins for the output file. @@ -175,12 +175,12 @@ with gv.Viewer("resume.docx") as viewer: ## Render tracked changes -GroupDocs.Viewer does not render tracked changes (revisions made to a Word document) by default. If you want to display tracked changes in the output file, use the [WordProcessingOptions.setRenderTrackedChanges](#) method for one of the following classes (depending on the output file format): +GroupDocs.Viewer does not render tracked changes (revisions made to a Word document) by default. If you want to display tracked changes in the output file, use the [WordProcessingOptions.render_tracked_changes](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/wordprocessingoptions/#properties) method for one of the following classes (depending on the output file format): -* [HtmlViewOptions](#) -* [PdfViewOptions](#) -* [PngViewOptions](#) -* [JpgViewOptions](#) +* [HtmlViewOptions.for_embedded_resources](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/htmlviewoptions/#methods) +* [PdfViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pdfviewoptions/) +* [PngViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/pngviewoptions/) +* [JpgViewOptions](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/jpgviewoptions/) The following code example demonstrates how to render a Word document with tracked changes: @@ -203,7 +203,7 @@ The following image illustrates the result: ## Render comments -Use the [ViewOptions.setRenderComments](#) method for a target view to display comments in the output file when you convert your document to HTML, PDF, PNG, or JPEG format. +Use the [ViewOptions.render_comments](https://reference.groupdocs.com/viewer/python-net/groupdocs.viewer.options/viewoptions/#properties) method for a target view to display comments in the output file when you convert your document to HTML, PDF, PNG, or JPEG format. The code example below renders a Word document with comments to PDF.