Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PreloadedPagesOffset Function

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

#Declaration

TypeScript
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:

cshtml
<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()
}