Fit modes

In this document
chevron_rightList of fit modes
chevron_rightOutside the iframe
chevron_rightRelated events
chevron_rightOutside the iframe

List of fit modes

Fit modeDescription
FitWidthZoom level is constrained such that current page's width fills the available space
FitPageZoom level is constrained by either the width or height such that the entire page is visible
ZoomZoom level is not constrained

Changing fit mode through UI

  • Buttons to change the fit mode are found on the top tool bar
  • The first button changes the fit mode to FitWidth and the second to FitPage

Changing fit mode programmatically

Outside the iframe

var currentFitMode = myWebViewer.getFitMode();
myWebViewer.setFitMode(CoreControls.DocumentViewer.FitMode.FitWidth);

Inside a config file

var currentLayoutMode = readerControl.getFitMode();
readerControl.setFitMode(CoreControls.DocumentViewer.FitMode.FitWidth);

Each fit mode is listed at CoreControls.DocumentViewer.FitMode.

Outside the iframe

$(viewerElement).on('fitModeChanged', function(event, fitMode) {
  ...
});

Inside a config file

$(document).on('fitModeChanged', function(event, fitMode) {
  ...
});

// or

readerControl.docViewer.on('fitModeUpdated', function(event, fitMode) {
  ...
});