Skip to main content
All docs
V24.1

PreloadedPagesOffset Function

Specifies the number of pages to be preloaded in the Web Document Viewer.

Declaration

export const PreloadedPagesOffset: DevExpress.Analytics.Internal.IGlobalSubscribableValue<number>

Parameters

Name Type
newVal number

Returns

Type
number

Remarks

This property’s default value is 15. This means that in single-page mode, the Document Viewer preloads the first 15 pages of a report in high resolution. It continues to preload the remaining pages in low resolution in batches of 15 pages.

The following code snippet changes the PreloadedPagesOffset value to 7 pages:

<script>
    function onBeforeRender(s, e) {
        DevExpress.Reporting.Viewer.Settings.PreloadedPagesOffset(7);
    }
</script>
@{
    var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
        .Height("100%")
        .ClientSideEvents(configure => configure.BeforeRender("onBeforeRender"))
        .Bind(Model.ViewerModelToBind);
    @viewerRender.RenderHtml()
}