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

Defines the fluent API for configuring the EditorPdfSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class EditorPdfSettingsBuilder

Inheritance: objectEditorPdfSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public EditorPdfSettingsBuilder(EditorPdfSettings settings)
Parameters:settingsEditorPdfSettings

Methods

Sets the author of the PDF document.

C#
public EditorPdfSettingsBuilder Author(string value)
Parameters:valuestring

The value that configures the author.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf => pdf.Author("User1"))
)

Sets the creator of the PDF document.

C#
public EditorPdfSettingsBuilder Creator(string value)
Parameters:valuestring

The value that configures the creator.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf => pdf.Creator("User1"))
)

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

C#
public EditorPdfSettingsBuilder Date(DateTime value)
Parameters:valueDateTime

The value that configures the date.

Returns:

EditorPdfSettingsBuilder

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

Specifies the file name of the exported PDF file.

C#
public EditorPdfSettingsBuilder FileName(string value)
Parameters:valuestring

The value that configures the filename.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf => pdf.FileName("SampleReport"))
)

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

C#
public EditorPdfSettingsBuilder ForceProxy(bool value)
Parameters:valuebool

The value that enables the ForceProxy option.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf => pdf.ForceProxy(true))
)

Specifies the keywords of the exported PDF file.

C#
public EditorPdfSettingsBuilder Keywords(string value)
Parameters:valuestring

The value that configures the keywords.

Returns:

EditorPdfSettingsBuilder

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

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

C#
public EditorPdfSettingsBuilder Landscape(bool value)
Parameters:valuebool

The value that enables the Landscape option.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf => pdf.Landscape(true))
)

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

C#
public EditorPdfSettingsBuilder Margin(Action<EditorPdfMarginSettingsBuilder> configurator)
Parameters:configuratorAction<EditorPdfMarginSettingsBuilder>

The action that configures the margin.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf =&gt; pdf.Margin(20,20,20,20))
)

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

C#
public EditorPdfSettingsBuilder PaperSize(string value)
Parameters:valuestring

The value that configures the PaperSize.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf =&gt; pdf.PaperSize("A4"))
)

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

C#
public EditorPdfSettingsBuilder ProxyTarget(string value)
Parameters:valuestring

The value that configures the ProxyTarget.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf =&gt; pdf.ProxyTarget("_blank"))
)

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

C#
public EditorPdfSettingsBuilder ProxyURL(string value)
Parameters:valuestring

The value that configures the ProxyURL.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf =&gt; pdf.ProxyURL("/save"))
)

Sets the subject of the PDF file.

C#
public EditorPdfSettingsBuilder Subject(string value)
Parameters:valuestring

The value that configures the subject.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf =&gt; pdf.Subject("Editor overview"))
)

Sets the title of the PDF file.

C#
public EditorPdfSettingsBuilder Title(string value)
Parameters:valuestring

The value that configures the title.

Returns:

EditorPdfSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Pdf(pdf =&gt; pdf.Title("Overview"))
)