GroupDocs.Viewer for Python via .NET 24.7 has been released for the Windows x32 platform. Python developers can use all supported file formats in this release. Other important enhancements are also a part of this version.
The file format-related restriction from the earlier versions has been lifted in the latest release. This upgrade allows you to unleash the document viewing power of your Python apps. The Python document viewer API enables you to render an extensive range of document types within your Python applications running on Windows x32.
Enriched Excel Rendering
We have introduced the capability to render Excel spreadsheets with accurate control over page breaks and print areas. This feature mirrors the printing functionality in Excel, allowing you to split the printable area into separate pages based on included page breaks. You can achieve this by calling the SpreadsheetOptions.ForRenderingPrintAreaAndPageBreaks
method, as illustrated in the following code example.
# render spreadsheet into PDF
with gv.Viewer("products.xlsx") as viewer:
viewOptions = gvo.PdfViewOptions("output.pdf")
viewOptions.spreadsheet_options = gvo.SpreadsheetOptions.for_rendering_print_area_and_page_breaks()
viewer.view(viewOptions)
# render spreadsheet into HTML
with gv.Viewer("products.xlsx") as viewer:
viewOptions = gvo.HtmlViewOptions.for_embedded_resources("page_{0}.html")
viewOptions.spreadsheet_options = gvo.SpreadsheetOptions.for_rendering_print_area_and_page_breaks()
viewer.view(viewOptions)
Source*
Control External Resource Loading
The SkipExternalResources
and WhitelistedResources
properties have now been added to the LoadOptions
class. These newly added options equip you to better manage performance and security. You can skip downloading all external resources or choose to skip them as required within your Windows x32-powered Python apps.
Skip all external resources:
load_options = gvo.LoadOptions()
load_options.skip_external_resources = True # Skip loading of external resources
with gv.Viewer("business-flyer.docx", load_options) as viewer:
viewOptions = gvo.HtmlViewOptions.for_embedded_resources()
viewer.view(viewOptions)
Source*
Select which external resources to skip:
load_options = gvo.LoadOptions()
load_options.skip_external_resources = True # Skip loading of external resources
load_options.white_listed_resources.add("avatars.githubusercontent.com") # Enable loading of external resources that has 'avatars.githubusercontent.com' fragment in resource URL.
with gv.Viewer("business-flyer.docx", load_options) as viewer:
viewOptions = gvo.HtmlViewOptions.for_embedded_resources()
viewer.view(viewOptions)
Source*
Effortlessly Read License from Embedded Resources
Incorporate embedded license support into your Python solutions for a managed licensing experience. GroupDocs.Viewer for Python via .NET 24.7 helps you specify the license name within your project, and ascertains the license file is included as an embedded resource in your Windows 32-bit applications. This code example highlights how to use this feature in Python.
# set license from embedded resource
license = gv.License()
license.set_license("GroupDocs.Viewer.lic")
Source*
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting GroupDocs.Viewer for Python via .NET 24.7 Release Notes.