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

Kendo UI PDFViewer component

Definition

Constructors

Initializes a new instance of the PDFViewer class.

C#
public PDFViewer(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

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

C#
public PDFViewerDefaultPageSizeSettings DefaultPageSize { get; set; }

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

C#
public ClientHandlerDescriptor Document { get; set; }

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>.

C#
public PDFViewerDplProcessingSettings DplProcessing { get; set; }

The height of the PDFViewer.

C#
public double? Height { get; set; }

Specifies the localization messages of the PDFViewer.

C#
public PDFViewerMessagesSettings Messages { get; set; }

The selected page number in the viewer.

C#
public double? Page { get; set; }

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

C#
public PDFViewerPdfjsProcessingSettings PdfjsProcessing { get; set; }

Specifies the default scale of the pages.

C#
public double? Scale { get; set; }

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.

C#
public PDFViewerToolbarSettings Toolbar { get; set; }

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.

C#
public PDFViewerViewSettings View { get; set; }

The width of the PDFViewer.

C#
public double? Width { get; set; }

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

C#
public double? ZoomMax { get; set; }

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

C#
public double? ZoomMin { get; set; }

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

C#
public double? ZoomRate { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)