Some test text!

Fit modes

In this document
chevron_rightList of fit modes
chevron_rightChanging fit mode through UI
chevron_rightChanging fit mode programmatically
chevron_rightOutside the iframe
chevron_rightInside a config file
chevron_rightRelated events
chevron_rightOutside the iframe
chevron_rightInside a config file

linkList 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

linkChanging 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

linkChanging fit mode programmatically

linkOutside the iframe

var currentFitMode = myWebViewer.getFitMode();
var docViewer = myWebViewer.getInstance().docViewer;
myWebViewer.setFitMode(docViewer.FitMode.FitWidth);

linkInside a config file

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

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

linkRelated events

linkOutside the iframe

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

linkInside a config file

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

// or

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