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

EditorPdfSettingsBuilder

Methods

Author(System.String)

Sets the author of the PDF document.

Parameters

value - System.String

The value that configures the author.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.Author("User1"))
            )

Creator(System.String)

Sets the creator of the PDF document.

Parameters

value - System.String

The value that configures the creator.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.Creator("User1"))
            )

Date(System.DateTime)

Defines the date when the PDF document is created. Defaults to new Date().

Parameters

value - System.DateTime

The value that configures the date.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.Date(DateTime.Now))
            )

FileName(System.String)

Specifies the file name of the exported PDF file.

Parameters

value - System.String

The value that configures the filename.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.FileName("SampleReport"))
            )

ForceProxy(System.Boolean)

If set to true, the content will be forwarded to proxyURL even if the browser supports saving files locally.

Parameters

value - System.Boolean

The value that enables the ForceProxy option.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.ForceProxy(true))
            )

Keywords(System.String)

Specifies the keywords of the exported PDF file.

Parameters

value - System.String

The value that configures the keywords.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.Keywords("Editor PDF export"))
            )

Landscape(System.Boolean)

Set to true to reverse the paper dimensions if needed such that width is the larger edge.

Parameters

value - System.Boolean

The value that enables the Landscape option.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.Landscape(true))
            )

Margin(System.Action)

Specifies the margins of the page (numbers or strings with units). Supported units are "mm", "cm", "in" and "pt" (default).

Parameters

configurator - System.Action<EditorPdfMarginSettingsBuilder>

The action that configures the margin.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.Margin(20,20,20,20))
            )

PaperSize(System.String)

Specifies the paper size of the PDF document. The default "auto" means paper size is determined by content.Supported values:

Parameters

value - System.String

The value that configures the PaperSize.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.PaperSize("A4"))
            )

ProxyURL(System.String)

The URL of the server side proxy which will stream the file to the end user. A proxy will be used when the browser isn't capable of saving files locally (e.g., Internet Explorer 9 and Safari). PDF export is not supported in Internet Explorer 8 and below. 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", "base64", "fileName". The proxy should return the decoded file with the "Content-Disposition" header set to attachment; filename="<fileName.pdf>".

Parameters

value - System.String

The value that configures the ProxyURL.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.ProxyURL("/save"))
            )

ProxyTarget(System.String)

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

Parameters

value - System.String

The value that configures the ProxyTarget.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.ProxyTarget("_blank"))
            )

Subject(System.String)

Sets the subject of the PDF file.

Parameters

value - System.String

The value that configures the subject.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.Subject("Editor overview"))
            )

Title(System.String)

Sets the title of the PDF file.

Parameters

value - System.String

The value that configures the title.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Pdf(pdf => pdf.Title("Overview"))
            )

In this article
Not finding the help you need?