.Net UI Fit document in screen

hello, im using your viewer product demo from GitHub - groupdocs-viewer/GroupDocs.Viewer-for-.NET-UI: UI - User Interface for GroupDocs.Viewer for .NET document viewer and automation API., and i wanted to fit document in screen
this is the current version
image.png (64.9 KB)
what i want is:
image.png (55.9 KB)
thank you for attention

@mtiryaki

Thank you for posting this topic. At the moment it is not supported to set default zoom value to Fit Width. I have created the issue with ID VIEWERNET-4969 in our internal bug tracker and planned it for investigation.

1 Like

@mtiryaki

GroupDocs.Viewer.UI 25.3 adds feature that enables you to set default zoom level.

By default, the zoom level is automatically determined by the UI to fit the document if possible.
The default value can be customized using the InitialZoom property. Available zoom levels include:

  • ZoomLevel.FitWidth
  • ZoomLevel.FitHeight
  • ZoomLevel.Percent25
  • ZoomLevel.Percent50
  • ZoomLevel.Percent100
  • ZoomLevel.Percent200
  • ZoomLevel.Percent300

The following code sets the default zoom level to fit the document by width:

builder.Services
    .AddGroupDocsViewerUI(config =>
    {
        config.InitialZoom = ZoomLevel.FitWidth;
    });

The screenshot below demonstrates the zoom automatically set to 175% to occupy the available space by width:

Have a nice day!