PDFViewerBuilder

Properties

WriteAction - Func

Methods

PdfjsProcessing(System.Action)

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

Parameters

configurator - System.Action<PDFViewerPdfjsProcessingSettingsBuilder>

The configurator for the pdfjsprocessing setting.

RETURNS

Returns the current instance of PDFViewerBuilder .

DplProcessing(System.Action)

Specifies the DPL configuration options. For a complete demo and a backend implementation, check the <a href="https://demos.telerik.com/aspnet-core/pdfviewer/dpl-processing" target="_blank">Telerik UI for ASP.NET Core DPL Processing demo</a>.

Parameters

configurator - System.Action<PDFViewerDplProcessingSettingsBuilder>

The configurator for the dplprocessing setting.

RETURNS

Returns the current instance of PDFViewerBuilder .

Width(System.Double)

The width of the PDFViewer.

Parameters

value - System.Double

The value for Width

RETURNS

Returns the current PDFViewerBuilder instance.

Example

Razor
 
            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Width(500)
             )
             

Height(System.Double)

The height of the PDFViewer.

Parameters

value - System.Double

The value for Height

RETURNS

Returns the current PDFViewerBuilder instance.

Example

Razor
 
            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Height(1200)
             )
             

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 configurator for the defaultpagesize setting.

RETURNS

Returns the current instance of PDFViewerBuilder .

Page(System.Double)

The selected page number in the viewer.

Parameters

value - System.Double

The value for Page

RETURNS

Returns the current PDFViewerBuilder instance.

Example

Razor
 
            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Page(1)
             )
             

Scale(System.Double)

Specifies the default scale of the pages.

Parameters

value - System.Double

The value for Scale

RETURNS

Returns the current PDFViewerBuilder instance.

Example

Razor
 
            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .Scale(1.5)
             )
             

ZoomMin(System.Double)

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

Parameters

value - System.Double

The value for ZoomMin

RETURNS

Returns the current PDFViewerBuilder instance.

Example

Razor
 
            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .ZoomMin(1)
             )
             

ZoomMax(System.Double)

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

Parameters

value - System.Double

The value for ZoomMax

RETURNS

Returns the current PDFViewerBuilder instance.

Example

Razor
 
            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .ZoomMax(2)
             )
             

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 for ZoomRate

RETURNS

Returns the current PDFViewerBuilder instance.

Example

Razor
 
            @(Html.Kendo().PDFViewer()
               .Name("pdfviewer")
               .ZoomRate(0.5)
             )
             

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 configurator for the view setting.

RETURNS

Returns the current instance of PDFViewerBuilder .

Toolbar(System.Action)

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

Parameters

configurator - System.Action<PDFViewerToolbarSettingsBuilder>

The configurator for the toolbar setting.

RETURNS

Returns the current instance of PDFViewerBuilder .

Toolbar(System.Boolean)

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

Parameters

enabled - System.Boolean

Enables or disables the toolbar option.

RETURNS

Returns the current instance of PDFViewerToolbarSettingsBuilder .

Messages(System.Action)

Specifies the localization messages of the PDFViewer.

Parameters

configurator - System.Action<PDFViewerMessagesSettingsBuilder>

The configurator for the messages setting.

RETURNS

Returns the current instance of PDFViewerBuilder .

Document(System.String)

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

Parameters

handler - System.String

The name of the JavaScript function that will be evaluated.

RETURNS

Returns the current PDFViewerBuilder instance.

Document(System.Func)

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

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current PDFViewerBuilder instance.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<PDFViewerEventBuilder>

The client events action.

RETURNS

Returns the current PDFViewerBuilder instance.

Example

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

ToComponent()

Returns the internal view component.

RETURNS

The instance that represents the component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

The name.

RETURNS

Returns the current instance.

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

The name.

RETURNS

Returns the current instance.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

RETURNS

Returns the current instance.

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,System.Boolean)

Parameters

deferred - System.Boolean

RETURNS

Returns a DeferredWidgetBuilder instance.

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

RETURNS

Returns the current instance.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

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

The HTML attributes.

RETURNS

Returns the current instance.

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

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

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

RETURNS

Returns the current instance.

Render()

Renders the component in place.

ToHtmlString()

Returns the HTML representation of the component.

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

Returns the client template for the component.

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

RETURNS

Returns the current instance.