PDFViewerTagHelper
Kendo UI PDFViewer TagHelper PDFViewerTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-pdfviewer")]
[RestrictChildren("dpl-processing", new string[] { "pdfjs-processing", "view", "toolbar", "messages", "default-page-size" })]
public class PDFViewerTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperBasePDFViewerTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<script type="module" src="https://unpkg.com/pdfjs-dist@5.6.205/build/pdf.min.mjs"></script>
<script type="module">
window.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://unpkg.com/pdfjs-dist@5.6.205/build/pdf.worker.min.mjs';
</script>
<kendo-pdfviewer name="pdfviewer" as-module="true"
height="1200">
<pdfjs-processing file="@Url.Content("~/sample.pdf")" />
<toolbar context-menu="true"></toolbar>
</kendo-pdfviewer>
Child Tags
Constructors
Initializes a new instance of the PDFViewerTagHelper class.
Properties
The client-side global variable or function to provide the JSON data for the PDF document.
public string Document { get; set; }
The name of the JavaScript function that will handle the error event. Fires when an error is encountered. By default, a dialog is shown with error message. The dialog will not be shown if the event is prevented.
public string OnError { get; set; }
The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the PDFViewer is focused.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnKendoKeydown { get; set; }
The name of the JavaScript function that will handle the open event. Fires when a PDF is opened in the viewer.
public string OnOpen { get; set; }
The name of the JavaScript function that will handle the render event. Fires when a page is rendered
public string OnRender { get; set; }
Specifies the maximum zoom that could be applied to the pages.
public double? ZoomMax { get; set; }
Specifies the minimum zoom that could be applied to the pages.
public double? ZoomMin { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: