New to Telerik UI for ASP.NET MVC? Download free 30-day trial

PDFViewerBuilder

Defines the fluent API for configuring the Kendo PDFViewer for ASP.NET MVC.

Methods

PdfjsProcessing(System.Action)

Specifies the PDF.JS configuration options. Including pdfjs is mandatory.

Parameters

configurator - System.Action<PDFViewerPdfjsProcessingSettingsBuilder>

The action that configures the pdfjsprocessing.

DplProcessing(System.Action)

Specifies the DPL configuration options.

Parameters

configurator - System.Action<PDFViewerDplProcessingSettingsBuilder>

The action that configures the dplprocessing.

Width(System.Double)

The width of the PDFViewer.

Parameters

value - System.Double

The value that configures the width.

Height(System.Double)

The height of the PDFViewer.

Parameters

value - System.Double

The value that configures the height.

DefaultPageSize(System.Action)

Specifies the default page size if no PDF is displayed in the PDFViewer. The page size will shrink to fit the viewer dimensions.

Parameters

configurator - System.Action<PDFViewerDefaultPageSizeSettingsBuilder>

The action that configures the defaultpagesize.

Page(System.Double)

The selected page number in the viewer.

Parameters

value - System.Double

The value that configures the page.

Scale(System.Double)

Specifies the default scale of the pages.

Parameters

value - System.Double

The value that configures the scale.

ZoomMin(System.Double)

Specifies the minimum zoom that could be applied to the pages.

Parameters

value - System.Double

The value that configures the zoommin.

ZoomMax(System.Double)

Specifies the maximum zoom that could be applied to the pages.

Parameters

value - System.Double

The value that configures the zoommax.

ZoomRate(System.Double)

Specifies the zoom rate that could be applied to the pages. Used when zooming on mousewheel and for the zoomIn and zoomOut tools.

Parameters

value - System.Double

The value that configures the zoomrate.

View(System.Action)

Defines the page surface options. This setting is available only for DPL Processing. The page render a drawing Surface and all of its configuration options could be defined.

Parameters

configurator - System.Action<PDFViewerViewSettingsBuilder>

The action that configures the view.

Toolbar(System.Boolean)

Toolbar option accepts a Boolean value which indicates if the toolbar will be displayed or an Object with items. Inherits Kendo UI Toolbar.

Parameters

enabled - System.Boolean

Enables or disables the toolbar option.

Toolbar(System.Action)

Toolbar option accepts a Boolean value which indicates if the toolbar will be displayed or an Object with items. Inherits Kendo UI Toolbar.

Parameters

configurator - System.Action<PDFViewerToolbarSettingsBuilder>

The action that configures the toolbar.

Messages(System.Action)

Specifies the localization messages of the PDFViewer.

Parameters

configurator - System.Action<PDFViewerMessagesSettingsBuilder>

The action that configures the messages.

Document(System.String)

The client-side global variable or function to provide the JSON data for the PDF document.

Parameters

value - System.String

The value that configures the document.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<PDFViewerEventBuilder>

The client events action.

Example


             @( Html.Kendo().PDFViewer()
                        .Name("PDFViewer")
                        .Events(events => events
                            .Render("onRender")
                        )
            )

ToComponent()

Returns the internal view component.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name of the component.

Example


            @(Html.Kendo().Grid<OrderViewModel>()
               .Name("grid")
               .Columns(columns =>
               {
                   columns.Bound(p => p.OrderID).Filterable(false);
                   columns.Bound(p => p.Freight);  
               })
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .PageSize(20)
                   .Read(read => read.Action("Orders_Read", "Grid"))
               )
            )

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean)

Parameters

deferred - System.Boolean

ModelMetadata(System.Web.Mvc.ModelMetadata)

Uses the Metadata of the Model.

Parameters

modelMetadata - System.Web.Mvc.ModelMetadata

The metadata set for the Model

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

Render()

Renders the component.

Example


            @(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
            @( Html.Kendo().Grid(Model)
                .Name("grid")
                .DetailTemplate(product => {
                    )
                       Product Details:
                       <div>Product Name: @( product.ProductName )</div>
                       <div>Units In Stock: @( product.UnitsInStock )</div>
                    @(
                })
                .Render();
            )

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?