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

Defines the fluent API for configuring the DiagramPdfSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TShapeModel

TConnectionModel

Syntax:

C#
public class DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> where TShapeModel : class where TConnectionModel : class

Inheritance: objectDiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

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

Constructors

C#
public DiagramPdfSettingsBuilder(DiagramPdfSettings settings)
Parameters:settingsDiagramPdfSettings

Methods

Defines the author of the PDF document that will be visible in the PDF file metadata.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> Author(string value)
Parameters:valuestring

The value that configures the author.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.Author("John Doe"))
)

Defines the creator of the PDF document.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> Creator(string value)
Parameters:valuestring

The value that configures the creator.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.Creator("John Doe"))
)

Defines the date when the PDF document is created. The default date is today's date.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> Date(DateTime value)
Parameters:valueDateTime

The value that configures the date.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.Date(DateTime.Now))
)

Specifies the file name of the exported PDF file.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> FileName(string value)
Parameters:valuestring

The value that configures the filename.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.FileName("Products.pdf"))
)

If set to "true", the content will be forwarded to the endpoint specified using the ProxyURL() setting, even if the browser supports saving of files in the user's local file system.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> ForceProxy(bool value)
Parameters:valuebool

The value that configures the ForceProxy option.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.ForceProxy(true).ProxyURL(Url.Action("Pdf_Export_Save", "Diagram")))
)

Specifies the keywords that will appear in the metadata of the exported PDF file.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> Keywords(string value)
Parameters:valuestring

The value that configures the keywords.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.Keywords("monthly report"))
)

Changes the document orientation to landscape. This option takes effect when the PaperSize() option is set.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> Landscape(bool value)
Parameters:valuebool

The value that configures the document orientation.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

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

Sets the paper margins. The specified numbers are assumed to be in points (pt).

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> Margin(Action<DiagramPdfMarginSettingsBuilder<TShapeModel, TConnectionModel>> configurator)
Parameters:configuratorAction<DiagramPdfMarginSettingsBuilder<TShapeModel, TConnectionModel>>

The action that configures the paper margins.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.Margin(m =&gt; m.Bottom(20).Top(10).Left(10).Right(10)))
)

Specifies the paper size of the PDF document. The default setting is "auto" and determines the paper size by content. The supported values are: A0-A10, B0-B10, C0-C10, Executive, Folio, Legal, Letter, Tabloid.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> PaperSize(string value)
Parameters:valuestring

The value that configures the paper size.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.PaperSize("A2"))
)

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 must set the "Content-Disposition" header of the response to 'inline; filename="<fileName.pdf>"'.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> ProxyTarget(string value)
Parameters:valuestring

The value that configures the proxy target.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.ProxyURL(Url.Action("Pdf_Export_Save", "Diagram")).ProxyTarget("_blank").ForceProxy(true))
)

The URL of the server side proxy, which will stream the file to the end user. When the browser is not capable of saving files locally, a proxy will be used. Such browsers are Internet Explorer version 9 (and older) and Safari. You are responsible for implementing the server-side proxy. The proxy receives 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.
  • fileName - The file name.

The proxy is expected to return the decoded file with a set "Content-Disposition" header.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> ProxyURL(string value)
Parameters:valuestring

The value that configures the proxy endpoint.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.ProxyURL(Url.Action("Pdf_Export_Save", "Diagram")))
)

Sets the subject of document, which will be shown in the PDF file metadata.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> Subject(string value)
Parameters:valuestring

The value that configures the subject.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.Subject("Placement of Products"))
)

Sets the title of the document, which will be shown in the PDF file metadata.

C#
public DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel> Title(string value)
Parameters:valuestring

The value that configures the title.

Returns:

DiagramPdfSettingsBuilder<TShapeModel, TConnectionModel>

Example:
C#
@(Html.Kendo().Diagram()
.Name("diagram")
.Pdf(pdf =&gt; pdf.Title("Products"))
)