Great news for macOS developers! GroupDocs.Viewer for Python via .NET 24.7 is here and it now allows utilizing all supporting file formats. This release includes other important feature updates for your Python apps running on macOS ARM64 architecture.
Unleash the document viewing power of your Python apps with the latest API release as we have removed the file format-related restriction from the earlier versions. With this update, you can render a broad range of file types within your Python applications running on Apple Mac.
Excel Rendering Boost
Render Excel spreadsheets with finer control over page breaks and print areas. This functionality mirrors the printing feature in Excel and allows you to split the printable area into distinct pages based on page breaks. You can call the SpreadsheetOptions.ForRenderingPrintAreaAndPageBreaks
method to add this feature to your Python document viewer solutions, 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*
Load External Resources Seamlessly
The newly added SkipExternalResources
and WhitelistedResources
properties to the LoadOptions
class enable effortlessly managing performance and security. Skip downloading all external resources or select which resources to skip as required within your Mac ARM64-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*
Use Embedded Resources to Read The License
Add embedded license support to your Python applications for an organized licensing experience. GroupDocs.Viewer for Python via .NET 24.7 lets you specify the license name within your project and ensures the license file is included as an embedded resource in your macOS 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.