Kendo UI pdf TagHelper GridPdfSettingsTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("pdf", ParentTag = "kendo-grid", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("grid-pdf-margin", new string[] { })]
[SuppressTagRendering]
public class GridPdfSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent, ITemplateComponent
Inheritance: objectTagHelperTagHelperChildBaseGridPdfSettingsTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-grid name="grid">
<pdf all-pages="true"></pdf>
</kendo-grid>
Child Tags
Constructors
Initializes a new instance of the GridPdfSettingsTagHelper class.
public GridPdfSettingsTagHelper()
Properties
Exports all grid pages, starting from the first one.
public bool? AllPages { get; set; }
Specifies if the Print dialog should be opened immediately after loading the document.
public bool? AutoPrint { get; set; }
A flag indicating whether to produce actual hyperlinks in the exported PDF file.It's also possible to pass a CSS selector as argument. All matching links will be ignored.
public bool? AvoidLinks { get; set; }
The date when the PDF document is created. Defaults to new Date().
public DateTime? Date { get; set; }
Specifies the file name of the exported PDF file.
public string FileName { get; set; }
Forces the page to break before each element that matches the applied CSS selector.
public string ForcePageBreak { get; set; }
If set to true, the content will be forwarded to proxyURL even if the browser supports saving files locally.
public bool? ForceProxy { get; set; }
Specifies the quality of the images within the exported file, from 0 to 1.
public double? JpegQuality { get; set; }
If set to true all PNG images contained in the exported file will be kept in PNG format.
public bool? KeepPNG { get; set; }
Specifies the keywords of the exported PDF file.
public string Keywords { get; set; }
Set to true to reverse the paper dimensions if needed such that width is the larger edge.
public bool? Landscape { get; set; }
Specifies the paper size of the PDF document. The default "auto" means paper size is determined by content.Supported values: A predefined size: "A4", "A3" etc; An array of two numbers specifying the width and height in points (1pt = 1/72in) or An array of two strings specifying the width and height in units. Supported units are "mm", "cm", "in" and "pt"..
public string PaperSize { get; set; }
A name or keyword indicating where to display the document returned from the proxy.If you want to display the document in a new window or iframe, the proxy should set the "Content-Disposition" header to inline; filename="<fileName.pdf>".
public string ProxyTarget { get; set; }
The URL of the server side proxy which will stream the file to the end user.A proxy will be used when the browser is not capable of saving files locally, for example, Internet Explorer 9 and Safari.The developer is responsible for implementing the server-side proxy.The proxy will receive a POST request with the following parameters in the request body: contentType: The MIME type of the file; base64: The base-64 encoded file content or fileName: The file name, as requested by the caller.. The proxy should return the decoded file with the "Content-Disposition" header set to attachment; filename="<fileName.pdf>".
public string ProxyURL { get; set; }
Set this to true to repeat the grid headers on each page.
public bool? RepeatHeaders { get; set; }
A scale factor. In many cases, text size on screen will be too big for print, so you can use this option to scale down the output in PDF. See the Scaling the Drawings article.
public double? Scale { get; set; }
A piece of HTML to be included in each page. Can be used to display headers and footers. See the documentation in drawDOM.Available template variables include: * pageNum * totalPages
public string Template { get; set; }
A piece of HTML to be included in each page. Can be used to display headers and footers. See the documentation in drawDOM.Available template variables include: * pageNum * totalPages This option expects the name of a JavaScript function that will be called to return the template.
public string TemplateHandler { get; set; }
A piece of HTML to be included in each page. Can be used to display headers and footers. See the documentation in drawDOM.Available template variables include: * pageNum * totalPages This option expects the ID of the script element that contains the template.
public string TemplateId { get; set; }
Configures the templates for the GridPdfSettings.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
A piece of HTML to be included in each page. Can be used to display headers and footers. See the documentation in drawDOM.Available template variables include: * pageNum * totalPages This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent TemplateView { get; set; }
Methods
Adds the current TagHelper instance to its parent TagHelper.
protected override void AddSelfToParent(TagHelperContext context)
The TagHelper context.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
Serializes the defined templates.